public RamlType newProperty ( String name , String type , boolean required , String ... values ) { if ( properties == null ) { properties = new LinkedHashMap <> ( ) ; } if ( values . length > 0 ) { properties . put ( required ? name : name + "?" , ImmutableMap . of ( "enum" , values ) ) ; } else { properties . put ( required ? name : name + "?" , type ) ; } return this ; }
Defines a new property .