forked from loafle/openapi-generator-original
Merge pull request #1269 from efossier/expose-readonly-to-template
Expose readOnly attribute on model properties to templates
This commit is contained in:
commit
d09d8bb495
@ -34,6 +34,7 @@ public class CodegenProperty {
|
||||
public Boolean hasMore = null, required = null, secondaryParam = null;
|
||||
public Boolean isPrimitiveType, isContainer, isNotContainer;
|
||||
public boolean isEnum;
|
||||
public Boolean isReadOnly = false;
|
||||
public List<String> _enum;
|
||||
public Map<String, Object> allowableValues;
|
||||
public CodegenProperty items;
|
||||
|
@ -642,6 +642,7 @@ public class DefaultCodegen {
|
||||
property.example = p.getExample();
|
||||
property.defaultValue = toDefaultValue(p);
|
||||
property.jsonSchema = Json.pretty(p);
|
||||
property.isReadOnly = p.getReadOnly();
|
||||
|
||||
String type = getSwaggerType(p);
|
||||
if (p instanceof AbstractNumericProperty) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user