validation for primitive request bodies #3491 (#3492)

* Add parameters to primitive request bodies

Signed-off-by: tim.smyth <tim.smyth@kiwigrid.com>

* Replace tabs for spaces

Signed-off-by: tim.smyth <tim.smyth@kiwigrid.com>
This commit is contained in:
timmiotool 2019-07-29 18:06:20 +02:00 committed by Esteban Gehring
parent 37cdc8e493
commit 3b584c2138

View File

@ -4928,6 +4928,15 @@ public class DefaultCodegen implements CodegenConfig {
codegenParameter.dataType = codegenProperty.dataType;
codegenParameter.description = codegenProperty.description;
codegenParameter.paramName = toParamName(codegenParameter.baseName);
codegenParameter.minimum = codegenProperty.minimum;
codegenParameter.maximum = codegenProperty.maximum;
codegenParameter.exclusiveMinimum = codegenProperty.exclusiveMinimum;
codegenParameter.exclusiveMaximum = codegenProperty.exclusiveMaximum;
codegenParameter.minLength = codegenProperty.minLength;
codegenParameter.maxLength = codegenProperty.maxLength;
codegenParameter.pattern = codegenProperty.pattern;
if (codegenProperty.complexType != null) {
imports.add(codegenProperty.complexType);