mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 06:00:52 +00:00
add hasValidation to codegenParameter
This commit is contained in:
parent
0792ddc9b4
commit
89703d86b7
@ -20,6 +20,7 @@ public class CodegenParameter {
|
||||
public Map<String, Object> allowableValues;
|
||||
public CodegenProperty items;
|
||||
public Map<String, Object> vendorExtensions;
|
||||
public Boolean hasValidation;
|
||||
|
||||
/**
|
||||
* Determines whether this parameter is mandatory. If the parameter is in "path",
|
||||
|
@ -1833,6 +1833,12 @@ public class DefaultCodegen {
|
||||
p.minItems = qp.getMinItems();
|
||||
p.uniqueItems = qp.isUniqueItems();
|
||||
p.multipleOf = qp.getMultipleOf();
|
||||
|
||||
if (p.maximum != null || p.exclusiveMaximum != null ||
|
||||
p.minimum != null || p.exclusiveMinimum != null ||
|
||||
p.maxLength != null || p.minLength != null ||
|
||||
p.maxItems != null || p.minItems != null ||
|
||||
p.pattern != null ||
|
||||
} else {
|
||||
if (!(param instanceof BodyParameter)) {
|
||||
LOGGER.error("Cannot use Parameter " + param + " as Body Parameter");
|
||||
|
Loading…
x
Reference in New Issue
Block a user