mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 19:33:55 +00:00
[2.0 Spec] Implement Schema Object.example field
see issue https://github.com/wordnik/swagger-core/issues/699, pull-request https://github.com/wordnik/swagger-core/pull/700
This commit is contained in:
parent
c75a951668
commit
89a009c411
@ -12,6 +12,8 @@ public class CodegenProperty {
|
||||
public Integer minLength;
|
||||
/** pattern validation for strings, see http://json-schema.org/latest/json-schema-validation.html#rfc.section.5.2.3 */
|
||||
public String pattern;
|
||||
/** A free-form property to include an example of an instance for this schema. */
|
||||
public String example;
|
||||
|
||||
public Double minimum, maximum, exclusiveMinimum, exclusiveMaximum;
|
||||
public Boolean hasMore = null, required = null, secondaryParam = null;
|
||||
|
@ -412,7 +412,7 @@ public class DefaultCodegen {
|
||||
property.description = p.getDescription();
|
||||
property.getter = "get" + name.substring(0, 1).toUpperCase() + name.substring(1);
|
||||
property.setter = "set" + name.substring(0, 1).toUpperCase() + name.substring(1);
|
||||
|
||||
property.example = p.getExample();
|
||||
property.defaultValue = toDefaultValue(p);
|
||||
|
||||
String type = getSwaggerType(p);
|
||||
|
Loading…
Reference in New Issue
Block a user