added required flag for parameter

This commit is contained in:
Tony Tam 2014-10-20 08:24:34 -07:00
parent 053419234a
commit 40b4d34870
2 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,7 @@
package com.wordnik.swagger.codegen;
public class CodegenParameter {
public Boolean hasMore = null, isContainer = null, secondaryParam = null;
public Boolean hasMore = null, isContainer = null, secondaryParam = null, required = null;
public String baseName, paramName, dataType, collectionFormat, description, baseType;
public Boolean isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam;
}

View File

@ -705,6 +705,7 @@ public class DefaultCodegen {
p.isQueryParam = new Boolean(true);
}
else if(param instanceof PathParameter) {
p.required = true;
pathParams.add(p);
p.isPathParam = new Boolean(true);
}