forked from loafle/openapi-generator-original
[python] fixes bugs (#13581)
* Adds bug fixes * Samples and docs regenerated * Samples regenerated
This commit is contained in:
@@ -22,6 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|library|library template (sub-template) to use: urllib3| |urllib3|
|
||||
|nonCompliantUseDiscriminatorIfCompositionFails|When true, If the payload fails to validate against composed schemas (allOf/anyOf/oneOf/not) and a discriminator is present, then ignore the composition validation errors and attempt to use the discriminator to validate the payload.<br />Note: setting this to true makes the generated client not comply with json schema because it ignores composition validation errors. Please consider making your schemas more restrictive rather than setting this to true. You can do that by:<ul><li>defining the propertyName as an enum with only one value in the schemas that are in your discriminator map</li><li>setting additionalProperties: false in your schemas</li></ul>|<dl><dt>**true**</dt><dd>If composition fails and a discriminator exists, the composition errors will be ignored and validation will be attempted with the discriminator</dd><dt>**false**</dt><dd>Composition validation must succeed. Discriminator validation must succeed.</dd></dl>|false|
|
||||
|packageName|python package name (convention: snake_case).| |openapi_client|
|
||||
|packageUrl|python package URL.| |null|
|
||||
|packageVersion|python package version.| |1.0.0|
|
||||
|
||||
@@ -404,4 +404,15 @@ public class CodegenConstants {
|
||||
|
||||
public static final String ERROR_OBJECT_TYPE = "errorObjectType";
|
||||
|
||||
public static final String NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS = "nonCompliantUseDiscriminatorIfCompositionFails";
|
||||
|
||||
public static final String NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS_DESC =
|
||||
"When true, If the payload fails to validate against composed schemas (allOf/anyOf/oneOf/not) and a " +
|
||||
"discriminator is present, then ignore the composition validation errors and attempt to use the " +
|
||||
"discriminator to validate the payload.<br />" +
|
||||
"Note: setting this to true makes the generated client not comply with json schema because it ignores " +
|
||||
"composition validation errors. Please consider making your schemas more restrictive rather than " +
|
||||
"setting this to true. You can do that by:<ul>" +
|
||||
"<li>defining the propertyName as an enum with only one value in the schemas that are in your discriminator map</li>" +
|
||||
"<li>setting additionalProperties: false in your schemas</li></ul>";
|
||||
}
|
||||
|
||||
@@ -105,6 +105,8 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
// for apis.tags tag api definition
|
||||
private Map<String, String> tagEnumToApiClassname = new LinkedHashMap<>();
|
||||
|
||||
private boolean nonCompliantUseDiscrIfCompositionFails = false;
|
||||
|
||||
public PythonClientCodegen() {
|
||||
super();
|
||||
loadDeepObjectIntoItems = false;
|
||||
@@ -215,6 +217,13 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
cliOptions.add(new CliOption(RECURSION_LIMIT, "Set the recursion limit. If not set, use the system default value."));
|
||||
cliOptions.add(CliOption.newBoolean(USE_INLINE_MODEL_RESOLVER, "use the inline model resolver, if true inline complex models will be extracted into components and $refs to them will be used").
|
||||
defaultValue(Boolean.FALSE.toString()));
|
||||
CliOption nonCompliantUseDiscrIfCompositionFails = CliOption.newBoolean(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS, CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS_DESC);
|
||||
Map<String, String> nonCompliantUseDiscrIfCompositionFailsOpts = new HashMap<>();
|
||||
nonCompliantUseDiscrIfCompositionFailsOpts.put("true", "If composition fails and a discriminator exists, the composition errors will be ignored and validation will be attempted with the discriminator");
|
||||
nonCompliantUseDiscrIfCompositionFailsOpts.put("false", "Composition validation must succeed. Discriminator validation must succeed.");
|
||||
nonCompliantUseDiscrIfCompositionFails.setEnum(nonCompliantUseDiscrIfCompositionFailsOpts);
|
||||
|
||||
cliOptions.add(nonCompliantUseDiscrIfCompositionFails);
|
||||
|
||||
supportedLibraries.put("urllib3", "urllib3-based client");
|
||||
CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use: urllib3");
|
||||
@@ -363,6 +372,12 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
}
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS)) {
|
||||
nonCompliantUseDiscrIfCompositionFails = Boolean.parseBoolean(
|
||||
additionalProperties.get(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS).toString()
|
||||
);
|
||||
}
|
||||
|
||||
String readmePath = "README.md";
|
||||
String readmeTemplate = "README." + templateExtension;
|
||||
if (generateSourceCodeOnly) {
|
||||
@@ -479,13 +494,13 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
return apiFileFolder() + File.separator + toApiFilename(tag) + suffix;
|
||||
}
|
||||
|
||||
private void generateFiles(List<List<Object>> processTemplateToFileInfos, String skippedByOption) {
|
||||
private void generateFiles(List<List<Object>> processTemplateToFileInfos, boolean shouldGenerate, String skippedByOption) {
|
||||
for (List<Object> processTemplateToFileInfo: processTemplateToFileInfos) {
|
||||
Map<String, Object> templateData = (Map<String, Object>) processTemplateToFileInfo.get(0);
|
||||
String templateName = (String) processTemplateToFileInfo.get(1);
|
||||
String outputFilename = (String) processTemplateToFileInfo.get(2);
|
||||
try {
|
||||
processTemplateToFile(templateData, templateName, outputFilename, true, skippedByOption);
|
||||
processTemplateToFile(templateData, templateName, outputFilename, shouldGenerate, skippedByOption);
|
||||
} catch (IOException e) {
|
||||
LOGGER.error("Error when writing template file {}", e.toString());
|
||||
}
|
||||
@@ -649,9 +664,11 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
outputFilename = packageFilename(Arrays.asList("apis", "paths", pathModule + ".py"));
|
||||
apisFiles.add(Arrays.asList(operationMap, "apis_path_module.handlebars", outputFilename));
|
||||
}
|
||||
generateFiles(pathsFiles, CodegenConstants.APIS);
|
||||
generateFiles(apisFiles, CodegenConstants.APIS);
|
||||
generateFiles(testFiles, CodegenConstants.API_TESTS);
|
||||
boolean shouldGenerateApis = (boolean) additionalProperties().get(CodegenConstants.GENERATE_APIS);
|
||||
boolean shouldGenerateApiTests = (boolean) additionalProperties().get(CodegenConstants.GENERATE_API_TESTS);
|
||||
generateFiles(pathsFiles, shouldGenerateApis, CodegenConstants.APIS);
|
||||
generateFiles(apisFiles, shouldGenerateApis, CodegenConstants.APIS);
|
||||
generateFiles(testFiles, shouldGenerateApiTests, CodegenConstants.API_TESTS);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1024,7 +1041,9 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
cp.isNullable = false;
|
||||
cp.setHasMultipleTypes(true);
|
||||
}
|
||||
postProcessPattern(cp.pattern, cp.vendorExtensions);
|
||||
if (p.getPattern() != null) {
|
||||
postProcessPattern(p.getPattern(), cp.vendorExtensions);
|
||||
}
|
||||
// if we have a property that has a difficult name, either:
|
||||
// 1. name is reserved, like class int float
|
||||
// 2. name is invalid in python like '3rd' or 'Content-Type'
|
||||
@@ -1468,7 +1487,11 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
@Override
|
||||
public CodegenModel fromModel(String name, Schema sc) {
|
||||
CodegenModel cm = super.fromModel(name, sc);
|
||||
|
||||
if (sc.getPattern() != null) {
|
||||
postProcessPattern(sc.getPattern(), cm.vendorExtensions);
|
||||
String pattern = (String) cm.vendorExtensions.get("x-regex");
|
||||
cm.setPattern(pattern);
|
||||
}
|
||||
if (cm.isNullable) {
|
||||
cm.setIsNull(true);
|
||||
cm.isNullable = false;
|
||||
@@ -1874,34 +1897,21 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
example = "2";
|
||||
} else if (StringUtils.isNotBlank(schema.getPattern())) {
|
||||
String pattern = schema.getPattern();
|
||||
List<Object> results = getPatternAndModifiers(pattern);
|
||||
String extractedPattern = (String) results.get(0);
|
||||
List<String> regexFlags = (List<String>) results.get(1);
|
||||
/*
|
||||
RxGen does not support our ECMA dialect https://github.com/curious-odd-man/RgxGen/issues/56
|
||||
So strip off the leading / and trailing / and turn on ignore case if we have it
|
||||
*/
|
||||
Pattern valueExtractor = Pattern.compile("^/?(.+?)/?(.?)$");
|
||||
Matcher m = valueExtractor.matcher(pattern);
|
||||
RgxGen rgxGen = null;
|
||||
if (m.find()) {
|
||||
int groupCount = m.groupCount();
|
||||
if (groupCount == 1) {
|
||||
// only pattern found
|
||||
String isolatedPattern = m.group(1);
|
||||
rgxGen = new RgxGen(isolatedPattern);
|
||||
} else if (groupCount == 2) {
|
||||
// patterns and flag found
|
||||
String isolatedPattern = m.group(1);
|
||||
String flags = m.group(2);
|
||||
if (flags.contains("i")) {
|
||||
rgxGen = new RgxGen(isolatedPattern);
|
||||
RgxGenProperties properties = new RgxGenProperties();
|
||||
RgxGenOption.CASE_INSENSITIVE.setInProperties(properties, true);
|
||||
rgxGen.setProperties(properties);
|
||||
} else {
|
||||
rgxGen = new RgxGen(isolatedPattern);
|
||||
}
|
||||
}
|
||||
if (regexFlags.size() > 0 && regexFlags.contains("i")) {
|
||||
rgxGen = new RgxGen(extractedPattern);
|
||||
RgxGenProperties properties = new RgxGenProperties();
|
||||
RgxGenOption.CASE_INSENSITIVE.setInProperties(properties, true);
|
||||
rgxGen.setProperties(properties);
|
||||
} else {
|
||||
rgxGen = new RgxGen(pattern);
|
||||
rgxGen = new RgxGen(extractedPattern);
|
||||
}
|
||||
|
||||
// this seed makes it so if we have [a-z] we pick a
|
||||
@@ -2083,12 +2093,12 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
}
|
||||
|
||||
example += toExampleValueRecursive(propModelName,
|
||||
propSchema,
|
||||
propExample,
|
||||
indentationLevel + 1,
|
||||
propName + "=",
|
||||
exampleLine + 1,
|
||||
includedSchemas) + ",\n";
|
||||
propSchema,
|
||||
propExample,
|
||||
indentationLevel + 1,
|
||||
propName + "=",
|
||||
exampleLine + 1,
|
||||
includedSchemas) + ",\n";
|
||||
}
|
||||
|
||||
// TODO handle additionalProperties also
|
||||
@@ -2341,6 +2351,16 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
property.pattern = toRegularExpression(p.getPattern());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toRegularExpression(String pattern) {
|
||||
if (pattern == null) {
|
||||
return null;
|
||||
}
|
||||
List<Object> results = getPatternAndModifiers(pattern);
|
||||
String extractedPattern = (String) results.get(0);
|
||||
return extractedPattern;
|
||||
}
|
||||
|
||||
protected void updatePropertyForNumber(CodegenProperty property, Schema p) {
|
||||
property.setIsNumber(true);
|
||||
// float and double differentiation is determined with format info
|
||||
@@ -2465,6 +2485,46 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
return postProcessModelsEnum(objs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pattern the regex pattern
|
||||
* @return List<String pattern, List<String modifer>>
|
||||
*/
|
||||
private List<Object> getPatternAndModifiers(String pattern) {
|
||||
/*
|
||||
Notes:
|
||||
RxGen does not support our ECMA dialect https://github.com/curious-odd-man/RgxGen/issues/56
|
||||
So strip off the leading / and trailing / and turn on ignore case if we have it
|
||||
|
||||
json schema test cases omit the leading and trailing /s, so make sure that the regex allows that
|
||||
*/
|
||||
Pattern valueExtractor = Pattern.compile("^/?(.+?)/?([simu]{0,4})$");
|
||||
Matcher m = valueExtractor.matcher(pattern);
|
||||
if (m.find()) {
|
||||
int groupCount = m.groupCount();
|
||||
if (groupCount == 1) {
|
||||
// only pattern found
|
||||
String isolatedPattern = m.group(1);
|
||||
return Arrays.asList(isolatedPattern, null);
|
||||
} else if (groupCount == 2) {
|
||||
List<String> modifiers = new ArrayList<String>();
|
||||
// patterns and flag found
|
||||
String isolatedPattern = m.group(1);
|
||||
String flags = m.group(2);
|
||||
if (flags.contains("s")) {
|
||||
modifiers.add("DOTALL");
|
||||
}
|
||||
if (flags.contains("i")) {
|
||||
modifiers.add("IGNORECASE");
|
||||
}
|
||||
if (flags.contains("m")) {
|
||||
modifiers.add("MULTILINE");
|
||||
}
|
||||
return Arrays.asList(isolatedPattern, modifiers);
|
||||
}
|
||||
}
|
||||
return Arrays.asList(pattern, new ArrayList<String>());
|
||||
}
|
||||
|
||||
/*
|
||||
* The OpenAPI pattern spec follows the Perl convention and style of modifiers. Python
|
||||
* does not support this in as natural a way so it needs to convert it. See
|
||||
@@ -2472,28 +2532,14 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
*/
|
||||
public void postProcessPattern(String pattern, Map<String, Object> vendorExtensions) {
|
||||
if (pattern != null) {
|
||||
int regexLength = pattern.length();
|
||||
String regex = pattern;
|
||||
int i = pattern.lastIndexOf('/');
|
||||
if (regexLength >= 2 && pattern.charAt(0) == '/' && i != -1) {
|
||||
// json schema tests do not include the leading and trailing slashes
|
||||
// so I do not think that they are required
|
||||
regex = pattern.substring(1, i);
|
||||
}
|
||||
regex = regex.replace("'", "\\'");
|
||||
List<String> modifiers = new ArrayList<String>();
|
||||
List<Object> results = getPatternAndModifiers(pattern);
|
||||
String extractedPattern = (String) results.get(0);
|
||||
List<String> modifiers = (List<String>) results.get(1);
|
||||
|
||||
if (i != -1) {
|
||||
for (char c : pattern.substring(i).toCharArray()) {
|
||||
if (regexModifiers.containsKey(c)) {
|
||||
String modifier = regexModifiers.get(c);
|
||||
modifiers.add(modifier);
|
||||
}
|
||||
}
|
||||
vendorExtensions.put("x-regex", extractedPattern);
|
||||
if (modifiers.size() > 0) {
|
||||
vendorExtensions.put("x-modifiers", modifiers);
|
||||
}
|
||||
|
||||
vendorExtensions.put("x-regex", regex);
|
||||
vendorExtensions.put("x-modifiers", modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2723,6 +2769,11 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public Map<String, Object> postProcessSupportingFileData(Map<String, Object> objs) {
|
||||
objs.put(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS, nonCompliantUseDiscrIfCompositionFails);
|
||||
return objs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcess() {
|
||||
System.out.println("################################################################################");
|
||||
@@ -2734,4 +2785,4 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
|
||||
System.out.println("# Please support his work directly via https://github.com/sponsors/spacether \uD83D\uDE4F#");
|
||||
System.out.println("################################################################################");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ from pprint import pprint
|
||||
{{#with apiInfo}}
|
||||
{{#each apis}}
|
||||
{{#if @first}}
|
||||
from {{packageName}}.{{apiPackage}} import {{classFilename}}
|
||||
from {{packageName}}.{{apiPackage}}.tags import {{classFilename}}
|
||||
{{#each imports}}
|
||||
{{{import}}}
|
||||
{{/each}}
|
||||
|
||||
@@ -1047,7 +1047,7 @@ class ApiClient:
|
||||
) -> urllib3.HTTPResponse:
|
||||
|
||||
# header parameters
|
||||
headers = headers or {}
|
||||
headers = headers or HTTPHeaderDict()
|
||||
headers.update(self.default_headers)
|
||||
if self.cookie:
|
||||
headers['Cookie'] = self.cookie
|
||||
|
||||
@@ -27,7 +27,6 @@ from . import path
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
RequestRequiredQueryParams = typing_extensions.TypedDict(
|
||||
'RequestRequiredQueryParams',
|
||||
{
|
||||
@@ -58,7 +57,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams)
|
||||
{{#each queryParams}}
|
||||
{{> endpoint_parameter }}
|
||||
{{/each}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#if headerParams}}
|
||||
# header params
|
||||
@@ -67,7 +65,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams)
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
RequestRequiredHeaderParams = typing_extensions.TypedDict(
|
||||
'RequestRequiredHeaderParams',
|
||||
{
|
||||
@@ -98,7 +95,6 @@ class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderPara
|
||||
{{#each headerParams}}
|
||||
{{> endpoint_parameter }}
|
||||
{{/each}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#if pathParams}}
|
||||
# path params
|
||||
@@ -107,7 +103,6 @@ class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderPara
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
RequestRequiredPathParams = typing_extensions.TypedDict(
|
||||
'RequestRequiredPathParams',
|
||||
{
|
||||
@@ -138,7 +133,6 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams):
|
||||
{{#each pathParams}}
|
||||
{{> endpoint_parameter }}
|
||||
{{/each}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#if cookieParams}}
|
||||
# cookie params
|
||||
@@ -147,7 +141,6 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams):
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
RequestRequiredCookieParams = typing_extensions.TypedDict(
|
||||
'RequestRequiredCookieParams',
|
||||
{
|
||||
@@ -178,7 +171,6 @@ class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookiePara
|
||||
{{#each cookieParams}}
|
||||
{{> endpoint_parameter }}
|
||||
{{/each}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#with bodyParam}}
|
||||
# body param
|
||||
@@ -187,7 +179,6 @@ class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookiePara
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
|
||||
|
||||
request_body_{{paramName}} = api_client.RequestBody(
|
||||
@@ -201,7 +192,6 @@ request_body_{{paramName}} = api_client.RequestBody(
|
||||
required=True,
|
||||
{{/if}}
|
||||
)
|
||||
{{/unless}}
|
||||
{{/with}}
|
||||
{{#unless isStub}}
|
||||
{{#each authMethods}}
|
||||
@@ -277,7 +267,6 @@ _servers = (
|
||||
{{> model_templates/schema }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
{{#if responseHeaders}}
|
||||
ResponseHeadersFor{{code}} = typing_extensions.TypedDict(
|
||||
'ResponseHeadersFor{{code}}',
|
||||
@@ -360,7 +349,6 @@ _response_for_{{code}} = api_client.OpenApiResponse(
|
||||
]
|
||||
{{/if}}
|
||||
)
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{#unless isStub}}
|
||||
_status_code_to_response = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{#each models}}
|
||||
{{#with model}}
|
||||
# {{packageName}}.{{modelPackage}}.{{classFilename}}.{{classname}}
|
||||
{{> schema_doc }}
|
||||
{{> schema_doc complexTypePrefix="" }}
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ def any_of(cls):
|
||||
{{#if complexType}}
|
||||
|
||||
@staticmethod
|
||||
def {{baseName}}() -> typing.Type['{{complexType}}']:
|
||||
def {{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}() -> typing.Type['{{complexType}}']:
|
||||
return {{complexType}}
|
||||
{{else}}
|
||||
{{> model_templates/schema }}
|
||||
|
||||
@@ -30,7 +30,7 @@ class properties:
|
||||
{{#if complexType}}
|
||||
|
||||
@staticmethod
|
||||
def {{baseName}}() -> typing.Type['{{complexType}}']:
|
||||
def {{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}() -> typing.Type['{{complexType}}']:
|
||||
return {{complexType}}
|
||||
{{else}}
|
||||
{{> model_templates/schema }}
|
||||
|
||||
@@ -1863,19 +1863,44 @@ class ComposedBase(Discriminable):
|
||||
path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata)
|
||||
except (ApiValueError, ApiTypeError) as ex:
|
||||
if discriminated_cls is not None and oneof_cls is discriminated_cls:
|
||||
{{#if nonCompliantUseDiscriminatorIfCompositionFails}}
|
||||
"""
|
||||
suppress exception because code was generated with
|
||||
nonCompliantUseDiscriminatorIfCompositionFails=true
|
||||
"""
|
||||
pass
|
||||
{{else}}
|
||||
raise ex
|
||||
{{/if}}
|
||||
continue
|
||||
oneof_classes.append(oneof_cls)
|
||||
if not oneof_classes:
|
||||
{{#if nonCompliantUseDiscriminatorIfCompositionFails}}
|
||||
if discriminated_cls:
|
||||
"""
|
||||
return without exception because code was generated with
|
||||
nonCompliantUseDiscriminatorIfCompositionFails=true
|
||||
"""
|
||||
return {}
|
||||
{{/if}}
|
||||
raise ApiValueError(
|
||||
"Invalid inputs given to generate an instance of {}. None "
|
||||
"of the oneOf schemas matched the input data.".format(cls)
|
||||
)
|
||||
elif len(oneof_classes) > 1:
|
||||
{{#if nonCompliantUseDiscriminatorIfCompositionFails}}
|
||||
if discriminated_cls:
|
||||
"""
|
||||
return without exception because code was generated with
|
||||
nonCompliantUseDiscriminatorIfCompositionFails=true
|
||||
"""
|
||||
return {}
|
||||
{{/if}}
|
||||
raise ApiValueError(
|
||||
"Invalid inputs given to generate an instance of {}. Multiple "
|
||||
"oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes)
|
||||
)
|
||||
# exactly one class matches
|
||||
return path_to_schemas
|
||||
|
||||
@classmethod
|
||||
@@ -1896,11 +1921,27 @@ class ComposedBase(Discriminable):
|
||||
other_path_to_schemas = anyof_cls._validate_oapg(arg, validation_metadata=validation_metadata)
|
||||
except (ApiValueError, ApiTypeError) as ex:
|
||||
if discriminated_cls is not None and anyof_cls is discriminated_cls:
|
||||
{{#if nonCompliantUseDiscriminatorIfCompositionFails}}
|
||||
"""
|
||||
suppress exception because code was generated with
|
||||
nonCompliantUseDiscriminatorIfCompositionFails=true
|
||||
"""
|
||||
pass
|
||||
{{else}}
|
||||
raise ex
|
||||
{{/if}}
|
||||
continue
|
||||
anyof_classes.append(anyof_cls)
|
||||
update(path_to_schemas, other_path_to_schemas)
|
||||
if not anyof_classes:
|
||||
{{#if nonCompliantUseDiscriminatorIfCompositionFails}}
|
||||
if discriminated_cls:
|
||||
"""
|
||||
return without exception because code was generated with
|
||||
nonCompliantUseDiscriminatorIfCompositionFails=true
|
||||
"""
|
||||
return {}
|
||||
{{/if}}
|
||||
raise ApiValueError(
|
||||
"Invalid inputs given to generate an instance of {}. None "
|
||||
"of the anyOf schemas matched the input data.".format(cls)
|
||||
@@ -1940,7 +1981,9 @@ class ComposedBase(Discriminable):
|
||||
)
|
||||
|
||||
# process composed schema
|
||||
discriminator = getattr(cls, 'discriminator', None)
|
||||
discriminator = None
|
||||
if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'):
|
||||
discriminator = cls.MetaOapg.discriminator()
|
||||
discriminated_cls = None
|
||||
if discriminator and arg and isinstance(arg, frozendict.frozendict):
|
||||
disc_property_name = list(discriminator.keys())[0]
|
||||
|
||||
@@ -21,13 +21,21 @@ import io.swagger.v3.oas.models.OpenAPI;
|
||||
import io.swagger.v3.oas.models.Operation;
|
||||
import io.swagger.v3.oas.models.media.*;
|
||||
import org.openapitools.codegen.*;
|
||||
import org.openapitools.codegen.config.CodegenConfigurator;
|
||||
import org.openapitools.codegen.languages.PythonClientCodegen;
|
||||
import org.openapitools.codegen.utils.ModelUtils;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("static-method")
|
||||
public class PythonClientTest {
|
||||
@@ -78,8 +86,8 @@ public class PythonClientTest {
|
||||
public void testRecursiveGeoJsonExampleWhenTypeIsGeoJsonGeometry() throws IOException {
|
||||
|
||||
testEndpointExampleValue("/geojson",
|
||||
"src/test/resources/3_0/issue_13043_recursive_model.yaml",
|
||||
"3_0/issue_13043_recursive_model_expected_value.txt");
|
||||
"src/test/resources/3_0/issue_13043_recursive_model.yaml",
|
||||
"3_0/issue_13043_recursive_model_expected_value.txt");
|
||||
|
||||
|
||||
}
|
||||
@@ -88,8 +96,8 @@ public class PythonClientTest {
|
||||
public void testRecursiveGeoJsonExampleWhenTypeIsGeometryCollection() throws IOException {
|
||||
|
||||
testEndpointExampleValue("/geojson_geometry_collection",
|
||||
"src/test/resources/3_0/issue_13043_recursive_model.yaml",
|
||||
"3_0/issue_13043_geometry_collection_expected_value.txt");
|
||||
"src/test/resources/3_0/issue_13043_recursive_model.yaml",
|
||||
"3_0/issue_13043_geometry_collection_expected_value.txt");
|
||||
|
||||
}
|
||||
|
||||
@@ -116,4 +124,77 @@ public class PythonClientTest {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@Test
|
||||
public void testApiTestsNotGenerated() throws Exception {
|
||||
File output = Files.createTempDirectory("test").toFile();
|
||||
|
||||
Map<String, String> globalProperties = Collections.singletonMap("apiTests", "false");
|
||||
final CodegenConfigurator configurator = new CodegenConfigurator()
|
||||
.setGlobalProperties(globalProperties)
|
||||
.setGeneratorName("python")
|
||||
.setInputSpec("src/test/resources/3_0/petstore.yaml")
|
||||
.setOutputDir(output.getAbsolutePath().replace("\\", "/"));
|
||||
|
||||
final ClientOptInput clientOptInput = configurator.toClientOptInput();
|
||||
DefaultGenerator generator = new DefaultGenerator();
|
||||
List<File> files = generator.opts(clientOptInput).generate();
|
||||
Assert.assertTrue(files.size() > 0);
|
||||
|
||||
Path pathThatShouldNotExist = output.toPath().resolve("openapi_client/test/test_paths");
|
||||
Assert.assertFalse(Files.isDirectory(pathThatShouldNotExist));
|
||||
output.deleteOnExit();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testApisNotGenerated() throws Exception {
|
||||
File output = Files.createTempDirectory("test").toFile();
|
||||
|
||||
Map<String, String> globalProperties = Collections.singletonMap("models", "");
|
||||
final CodegenConfigurator configurator = new CodegenConfigurator()
|
||||
.setGlobalProperties(globalProperties)
|
||||
.setGeneratorName("python")
|
||||
.setInputSpec("src/test/resources/3_0/petstore.yaml")
|
||||
.setOutputDir(output.getAbsolutePath().replace("\\", "/"));
|
||||
|
||||
final ClientOptInput clientOptInput = configurator.toClientOptInput();
|
||||
DefaultGenerator generator = new DefaultGenerator();
|
||||
List<File> files = generator.opts(clientOptInput).generate();
|
||||
Assert.assertTrue(files.size() > 0);
|
||||
|
||||
Path pathThatShouldNotExist = output.toPath().resolve("openapi_client/paths");
|
||||
Assert.assertFalse(Files.isDirectory(pathThatShouldNotExist));
|
||||
output.deleteOnExit();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRegexWithoutTrailingSlashWorks() {
|
||||
OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/11_regex.yaml");
|
||||
PythonClientCodegen codegen = new PythonClientCodegen();
|
||||
codegen.setOpenAPI(openAPI);
|
||||
|
||||
String modelName = "UUID";
|
||||
Schema schema = openAPI.getComponents().getSchemas().get(modelName);
|
||||
|
||||
CodegenModel cm = codegen.fromModel(modelName, schema);
|
||||
String expectedRegexPattern = "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}";
|
||||
Assert.assertEquals(cm.getPattern(), expectedRegexPattern);
|
||||
Assert.assertEquals(cm.vendorExtensions.get("x-regex"), expectedRegexPattern);
|
||||
Assert.assertFalse(cm.vendorExtensions.containsKey("x-modifiers"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRegexWithMultipleFlagsWorks() {
|
||||
OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/11_regex.yaml");
|
||||
PythonClientCodegen codegen = new PythonClientCodegen();
|
||||
codegen.setOpenAPI(openAPI);
|
||||
|
||||
String modelName = "StringWithRegexWithThreeFlags";
|
||||
Schema schema = openAPI.getComponents().getSchemas().get(modelName);
|
||||
|
||||
CodegenModel cm = codegen.fromModel(modelName, schema);
|
||||
String expectedRegexPattern = "a.";
|
||||
Assert.assertEquals(cm.getPattern(), expectedRegexPattern);
|
||||
Assert.assertEquals(cm.vendorExtensions.get("x-regex"), expectedRegexPattern);
|
||||
Assert.assertEquals(cm.vendorExtensions.get("x-modifiers"), Arrays.asList("DOTALL", "IGNORECASE", "MULTILINE"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Test
|
||||
version: 1.0.0-SNAPSHOT
|
||||
paths:
|
||||
/test:
|
||||
get:
|
||||
tags:
|
||||
- Test Resource
|
||||
parameters:
|
||||
- name: uuid
|
||||
in: query
|
||||
schema:
|
||||
$ref: '#/components/schemas/UUID'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
components:
|
||||
schemas:
|
||||
UUID:
|
||||
format: uuid
|
||||
pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
|
||||
type: string
|
||||
StringWithRegexWithThreeFlags:
|
||||
format: uuid
|
||||
pattern: "/a./sim"
|
||||
type: string
|
||||
@@ -2769,8 +2769,8 @@ components:
|
||||
Player:
|
||||
type: object
|
||||
description: a model that includes a self reference this forces properties and additionalProperties
|
||||
to be lazy loaded in python models because the Player class has not fully loaded when defining
|
||||
properties
|
||||
to be lazy loaded in python models because the Player class has not fully loaded when defining
|
||||
properties
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
@@ -2941,4 +2941,21 @@ components:
|
||||
double:
|
||||
format: double
|
||||
float:
|
||||
format: float
|
||||
format: float
|
||||
FromSchema:
|
||||
type: object
|
||||
properties:
|
||||
data:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
ObjectWithInvalidNamedRefedProperties:
|
||||
type: object
|
||||
properties:
|
||||
from:
|
||||
$ref: "#/components/schemas/FromSchema"
|
||||
"!reference":
|
||||
$ref: "#/components/schemas/ArrayWithValidationsInItems"
|
||||
required:
|
||||
- from
|
||||
- "!reference"
|
||||
@@ -140,7 +140,7 @@ Please follow the [installation procedure](#installation--usage) and then run th
|
||||
import time
|
||||
import unit_test_api
|
||||
from pprint import pprint
|
||||
from unit_test_api.apis import ref_api
|
||||
from unit_test_api.apis.tags import ref_api
|
||||
from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference
|
||||
from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties
|
||||
from unit_test_api.model.ref_in_allof import RefInAllof
|
||||
|
||||
@@ -1048,7 +1048,7 @@ class ApiClient:
|
||||
) -> urllib3.HTTPResponse:
|
||||
|
||||
# header parameters
|
||||
headers = headers or {}
|
||||
headers = headers or HTTPHeaderDict()
|
||||
headers.update(self.default_headers)
|
||||
if self.cookie:
|
||||
headers['Cookie'] = self.cookie
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.additionalproperties_allows_a_schema_which_should_valid
|
||||
SchemaForRequestBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShouldValidate
|
||||
|
||||
|
||||
request_body_additionalproperties_allows_a_schema_which_should_validate = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.additionalproperties_are_allowed_by_default import Addi
|
||||
SchemaForRequestBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault
|
||||
|
||||
|
||||
request_body_additionalproperties_are_allowed_by_default = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_additionalproperties_are_allowed_by_default_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.additionalproperties_can_exist_by_itself import Additio
|
||||
SchemaForRequestBodyApplicationJson = AdditionalpropertiesCanExistByItself
|
||||
|
||||
|
||||
request_body_additionalproperties_can_exist_by_itself = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_additionalproperties_can_exist_by_itself_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.additionalproperties_should_not_look_in_applicators imp
|
||||
SchemaForRequestBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplicators
|
||||
|
||||
|
||||
request_body_additionalproperties_should_not_look_in_applicators = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWit
|
||||
SchemaForRequestBodyApplicationJson = AllofCombinedWithAnyofOneof
|
||||
|
||||
|
||||
request_body_allof_combined_with_anyof_oneof = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_allof_combined_with_anyof_oneof_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.allof import Allof
|
||||
SchemaForRequestBodyApplicationJson = Allof
|
||||
|
||||
|
||||
request_body_allof = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_allof_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.allof_simple_types import AllofSimpleTypes
|
||||
SchemaForRequestBodyApplicationJson = AllofSimpleTypes
|
||||
|
||||
|
||||
request_body_allof_simple_types = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_allof_simple_types_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema
|
||||
SchemaForRequestBodyApplicationJson = AllofWithBaseSchema
|
||||
|
||||
|
||||
request_body_allof_with_base_schema = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_allof_with_base_schema_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySch
|
||||
SchemaForRequestBodyApplicationJson = AllofWithOneEmptySchema
|
||||
|
||||
|
||||
request_body_allof_with_one_empty_schema = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_allof_with_one_empty_schema_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFi
|
||||
SchemaForRequestBodyApplicationJson = AllofWithTheFirstEmptySchema
|
||||
|
||||
|
||||
request_body_allof_with_the_first_empty_schema = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_allof_with_the_first_empty_schema_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLas
|
||||
SchemaForRequestBodyApplicationJson = AllofWithTheLastEmptySchema
|
||||
|
||||
|
||||
request_body_allof_with_the_last_empty_schema = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_allof_with_the_last_empty_schema_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySc
|
||||
SchemaForRequestBodyApplicationJson = AllofWithTwoEmptySchemas
|
||||
|
||||
|
||||
request_body_allof_with_two_empty_schemas = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_allof_with_two_empty_schemas_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.anyof_complex_types import AnyofComplexTypes
|
||||
SchemaForRequestBodyApplicationJson = AnyofComplexTypes
|
||||
|
||||
|
||||
request_body_anyof_complex_types = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_anyof_complex_types_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.anyof import Anyof
|
||||
SchemaForRequestBodyApplicationJson = Anyof
|
||||
|
||||
|
||||
request_body_anyof = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_anyof_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema
|
||||
SchemaForRequestBodyApplicationJson = AnyofWithBaseSchema
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_anyof_with_base_schema_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySch
|
||||
SchemaForRequestBodyApplicationJson = AnyofWithOneEmptySchema
|
||||
|
||||
|
||||
request_body_anyof_with_one_empty_schema = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_anyof_with_one_empty_schema_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays
|
||||
SchemaForRequestBodyApplicationJson = ArrayTypeMatchesArrays
|
||||
|
||||
|
||||
request_body_array_type_matches_arrays = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_array_type_matches_arrays_request_body_oapg(
|
||||
|
||||
@@ -29,6 +29,27 @@ from unit_test_api import schemas # noqa: F401
|
||||
SchemaForRequestBodyApplicationJson = schemas.BoolSchema
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_boolean_type_matches_booleans_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.by_int import ByInt
|
||||
SchemaForRequestBodyApplicationJson = ByInt
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_by_int_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.by_number import ByNumber
|
||||
SchemaForRequestBodyApplicationJson = ByNumber
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_by_number_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.by_small_number import BySmallNumber
|
||||
SchemaForRequestBodyApplicationJson = BySmallNumber
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_by_small_number_request_body_oapg(
|
||||
|
||||
@@ -52,6 +52,27 @@ class SchemaForRequestBodyApplicationJson(
|
||||
)
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_date_time_format_request_body_oapg(
|
||||
|
||||
@@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson(
|
||||
)
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_email_format_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNot
|
||||
SchemaForRequestBodyApplicationJson = EnumWith0DoesNotMatchFalse
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_enum_with0_does_not_match_false_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotM
|
||||
SchemaForRequestBodyApplicationJson = EnumWith1DoesNotMatchTrue
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_enum_with1_does_not_match_true_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedChar
|
||||
SchemaForRequestBodyApplicationJson = EnumWithEscapedCharacters
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_enum_with_escaped_characters_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoe
|
||||
SchemaForRequestBodyApplicationJson = EnumWithFalseDoesNotMatch0
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_enum_with_false_does_not_match0_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesN
|
||||
SchemaForRequestBodyApplicationJson = EnumWithTrueDoesNotMatch1
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_enum_with_true_does_not_match1_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.enums_in_properties import EnumsInProperties
|
||||
SchemaForRequestBodyApplicationJson = EnumsInProperties
|
||||
|
||||
|
||||
request_body_enums_in_properties = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_enums_in_properties_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.forbidden_property import ForbiddenProperty
|
||||
SchemaForRequestBodyApplicationJson = ForbiddenProperty
|
||||
|
||||
|
||||
request_body_forbidden_property = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_forbidden_property_request_body_oapg(
|
||||
|
||||
@@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson(
|
||||
)
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_hostname_format_request_body_oapg(
|
||||
|
||||
@@ -29,6 +29,27 @@ from unit_test_api import schemas # noqa: F401
|
||||
SchemaForRequestBodyApplicationJson = schemas.IntSchema
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_integer_type_matches_integers_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_divi
|
||||
SchemaForRequestBodyApplicationJson = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.invalid_string_value_for_default import InvalidStringVa
|
||||
SchemaForRequestBodyApplicationJson = InvalidStringValueForDefault
|
||||
|
||||
|
||||
request_body_invalid_string_value_for_default = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_invalid_string_value_for_default_request_body_oapg(
|
||||
|
||||
@@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson(
|
||||
)
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_ipv4_format_request_body_oapg(
|
||||
|
||||
@@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson(
|
||||
)
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_ipv6_format_request_body_oapg(
|
||||
|
||||
@@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson(
|
||||
)
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_json_pointer_format_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.maximum_validation import MaximumValidation
|
||||
SchemaForRequestBodyApplicationJson = MaximumValidation
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_maximum_validation_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.maximum_validation_with_unsigned_integer import Maximum
|
||||
SchemaForRequestBodyApplicationJson = MaximumValidationWithUnsignedInteger
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_maximum_validation_with_unsigned_integer_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.maxitems_validation import MaxitemsValidation
|
||||
SchemaForRequestBodyApplicationJson = MaxitemsValidation
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_maxitems_validation_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.maxlength_validation import MaxlengthValidation
|
||||
SchemaForRequestBodyApplicationJson = MaxlengthValidation
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_maxlength_validation_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxprop
|
||||
SchemaForRequestBodyApplicationJson = Maxproperties0MeansTheObjectIsEmpty
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_maxproperties0_means_the_object_is_empty_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation
|
||||
SchemaForRequestBodyApplicationJson = MaxpropertiesValidation
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_maxproperties_validation_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.minimum_validation import MinimumValidation
|
||||
SchemaForRequestBodyApplicationJson = MinimumValidation
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_minimum_validation_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.minimum_validation_with_signed_integer import MinimumVa
|
||||
SchemaForRequestBodyApplicationJson = MinimumValidationWithSignedInteger
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_minimum_validation_with_signed_integer_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.minitems_validation import MinitemsValidation
|
||||
SchemaForRequestBodyApplicationJson = MinitemsValidation
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_minitems_validation_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.minlength_validation import MinlengthValidation
|
||||
SchemaForRequestBodyApplicationJson = MinlengthValidation
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_minlength_validation_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.minproperties_validation import MinpropertiesValidation
|
||||
SchemaForRequestBodyApplicationJson = MinpropertiesValidation
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_minproperties_validation_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.nested_allof_to_check_validation_semantics import Neste
|
||||
SchemaForRequestBodyApplicationJson = NestedAllofToCheckValidationSemantics
|
||||
|
||||
|
||||
request_body_nested_allof_to_check_validation_semantics = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_nested_allof_to_check_validation_semantics_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.nested_anyof_to_check_validation_semantics import Neste
|
||||
SchemaForRequestBodyApplicationJson = NestedAnyofToCheckValidationSemantics
|
||||
|
||||
|
||||
request_body_nested_anyof_to_check_validation_semantics = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_nested_anyof_to_check_validation_semantics_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.nested_items import NestedItems
|
||||
SchemaForRequestBodyApplicationJson = NestedItems
|
||||
|
||||
|
||||
request_body_nested_items = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_nested_items_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.nested_oneof_to_check_validation_semantics import Neste
|
||||
SchemaForRequestBodyApplicationJson = NestedOneofToCheckValidationSemantics
|
||||
|
||||
|
||||
request_body_nested_oneof_to_check_validation_semantics = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_nested_oneof_to_check_validation_semantics_request_body_oapg(
|
||||
|
||||
@@ -100,6 +100,27 @@ class SchemaForRequestBodyApplicationJson(
|
||||
)
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_not_more_complex_schema_request_body_oapg(
|
||||
|
||||
@@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson(
|
||||
)
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_not_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings
|
||||
SchemaForRequestBodyApplicationJson = NulCharactersInStrings
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_nul_characters_in_strings_request_body_oapg(
|
||||
|
||||
@@ -29,6 +29,27 @@ from unit_test_api import schemas # noqa: F401
|
||||
SchemaForRequestBodyApplicationJson = schemas.NoneSchema
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_null_type_matches_only_the_null_object_request_body_oapg(
|
||||
|
||||
@@ -29,6 +29,27 @@ from unit_test_api import schemas # noqa: F401
|
||||
SchemaForRequestBodyApplicationJson = schemas.NumberSchema
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_number_type_matches_numbers_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.object_properties_validation import ObjectPropertiesVal
|
||||
SchemaForRequestBodyApplicationJson = ObjectPropertiesValidation
|
||||
|
||||
|
||||
request_body_object_properties_validation = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_object_properties_validation_request_body_oapg(
|
||||
|
||||
@@ -29,6 +29,27 @@ from unit_test_api import schemas # noqa: F401
|
||||
SchemaForRequestBodyApplicationJson = schemas.DictSchema
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_object_type_matches_objects_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.oneof_complex_types import OneofComplexTypes
|
||||
SchemaForRequestBodyApplicationJson = OneofComplexTypes
|
||||
|
||||
|
||||
request_body_oneof_complex_types = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_oneof_complex_types_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.oneof import Oneof
|
||||
SchemaForRequestBodyApplicationJson = Oneof
|
||||
|
||||
|
||||
request_body_oneof = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_oneof_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema
|
||||
SchemaForRequestBodyApplicationJson = OneofWithBaseSchema
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_oneof_with_base_schema_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema
|
||||
SchemaForRequestBodyApplicationJson = OneofWithEmptySchema
|
||||
|
||||
|
||||
request_body_oneof_with_empty_schema = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_oneof_with_empty_schema_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.oneof_with_required import OneofWithRequired
|
||||
SchemaForRequestBodyApplicationJson = OneofWithRequired
|
||||
|
||||
|
||||
request_body_oneof_with_required = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_oneof_with_required_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored
|
||||
SchemaForRequestBodyApplicationJson = PatternIsNotAnchored
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_pattern_is_not_anchored_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.pattern_validation import PatternValidation
|
||||
SchemaForRequestBodyApplicationJson = PatternValidation
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_pattern_validation_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.properties_with_escaped_characters import PropertiesWit
|
||||
SchemaForRequestBodyApplicationJson = PropertiesWithEscapedCharacters
|
||||
|
||||
|
||||
request_body_properties_with_escaped_characters = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_properties_with_escaped_characters_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.property_named_ref_that_is_not_a_reference import Prope
|
||||
SchemaForRequestBodyApplicationJson = PropertyNamedRefThatIsNotAReference
|
||||
|
||||
|
||||
request_body_property_named_ref_that_is_not_a_reference = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_property_named_ref_that_is_not_a_reference_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalprope
|
||||
SchemaForRequestBodyApplicationJson = RefInAdditionalproperties
|
||||
|
||||
|
||||
request_body_ref_in_additionalproperties = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_ref_in_additionalproperties_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.ref_in_allof import RefInAllof
|
||||
SchemaForRequestBodyApplicationJson = RefInAllof
|
||||
|
||||
|
||||
request_body_ref_in_allof = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_ref_in_allof_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.ref_in_anyof import RefInAnyof
|
||||
SchemaForRequestBodyApplicationJson = RefInAnyof
|
||||
|
||||
|
||||
request_body_ref_in_anyof = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_ref_in_anyof_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.ref_in_items import RefInItems
|
||||
SchemaForRequestBodyApplicationJson = RefInItems
|
||||
|
||||
|
||||
request_body_ref_in_items = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_ref_in_items_request_body_oapg(
|
||||
|
||||
@@ -56,6 +56,27 @@ class SchemaForRequestBodyApplicationJson(
|
||||
)
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_ref_in_not_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.ref_in_oneof import RefInOneof
|
||||
SchemaForRequestBodyApplicationJson = RefInOneof
|
||||
|
||||
|
||||
request_body_ref_in_oneof = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_ref_in_oneof_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.ref_in_property import RefInProperty
|
||||
SchemaForRequestBodyApplicationJson = RefInProperty
|
||||
|
||||
|
||||
request_body_ref_in_property = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_ref_in_property_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.required_default_validation import RequiredDefaultValid
|
||||
SchemaForRequestBodyApplicationJson = RequiredDefaultValidation
|
||||
|
||||
|
||||
request_body_required_default_validation = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_required_default_validation_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.required_validation import RequiredValidation
|
||||
SchemaForRequestBodyApplicationJson = RequiredValidation
|
||||
|
||||
|
||||
request_body_required_validation = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_required_validation_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray
|
||||
SchemaForRequestBodyApplicationJson = RequiredWithEmptyArray
|
||||
|
||||
|
||||
request_body_required_with_empty_array = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_required_with_empty_array_request_body_oapg(
|
||||
|
||||
@@ -59,6 +59,27 @@ class SchemaForRequestBodyApplicationJson(
|
||||
)
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_required_with_escaped_characters_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.simple_enum_validation import SimpleEnumValidation
|
||||
SchemaForRequestBodyApplicationJson = SimpleEnumValidation
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_simple_enum_validation_request_body_oapg(
|
||||
|
||||
@@ -29,6 +29,27 @@ from unit_test_api import schemas # noqa: F401
|
||||
SchemaForRequestBodyApplicationJson = schemas.StrSchema
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_string_type_matches_strings_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_propert
|
||||
SchemaForRequestBodyApplicationJson = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing
|
||||
|
||||
|
||||
request_body_the_default_keyword_does_not_do_anything_if_the_property_is_missing = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseVal
|
||||
SchemaForRequestBodyApplicationJson = UniqueitemsFalseValidation
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_uniqueitems_false_validation_request_body_oapg(
|
||||
|
||||
@@ -31,6 +31,27 @@ from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation
|
||||
SchemaForRequestBodyApplicationJson = UniqueitemsValidation
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_uniqueitems_validation_request_body_oapg(
|
||||
|
||||
@@ -51,6 +51,27 @@ class SchemaForRequestBodyApplicationJson(
|
||||
)
|
||||
|
||||
|
||||
request_body_body = api_client.RequestBody(
|
||||
content={
|
||||
'application/json': api_client.MediaType(
|
||||
schema=SchemaForRequestBodyApplicationJson),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ApiResponseFor200(api_client.ApiResponse):
|
||||
response: urllib3.HTTPResponse
|
||||
body: schemas.Unset = schemas.unset
|
||||
headers: schemas.Unset = schemas.unset
|
||||
|
||||
|
||||
_response_for_200 = api_client.OpenApiResponse(
|
||||
response_cls=ApiResponseFor200,
|
||||
)
|
||||
|
||||
|
||||
class BaseApi(api_client.Api):
|
||||
|
||||
def _post_uri_format_request_body_oapg(
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user