Source:
<code>public Model getCREATEModel(Representation rep) { ModelImpl model = new ModelImpl() .property("encounter", new StringProperty().example("uuid")) .property("action", new StringProperty() <START> ._enum(EnumProperty.getEnumsAsList(Order.Action.class))) <END> .property("accessionNumber", new StringProperty()) .property("dateActivated", new DateProperty()) .property("scheduledDate", new DateProperty()) .property("patient", new StringProperty().example("uuid")) .property("concept", new StringProperty().example("uuid")) .property("careSetting", new StringProperty().example("uuid")) .property("dateStopped", new DateProperty()) .property("autoExpireDate", new DateProperty()) .property("orderer", new StringProperty().example("uuid")) .property("previousOrder", new StringProperty().example("uuid")) .property("urgency", new StringProperty() ._enum(EnumProperty.getEnumsAsList(Order.Urgency.class))) .property("orderReason", new StringProperty().example("uuid")) .property("orderReasonNonCoded", new StringProperty()) .property("instructions", new StringProperty()) .property("commentToFulfiller", new StringProperty()) .required("orderType").required("patient").required("concept"); if (rep instanceof FullRepresentation) { model .property("encounter", new RefProperty("#/definitions/EncounterCreate")) .property("patient", new RefProperty("#/definitions/PatientCreate")) .property("concept", new RefProperty("#/definitions/ConceptCreate")) .property("orderer", new RefProperty("#/definitions/UserCreate")) .property("previousOrder", new RefProperty("#/definitions/OrderCreate")) .property("orderReason", new RefProperty("#/definitions/ConceptCreate")); } return model; }</code><technical_language>new EnumProperty, instead of new StringProperty()._enum(EnumProperty.getEnumsAsList **Before:** new StringProperty()._enum(EnumProperty.getEnumsAsList(Order.Action.class)) **After:** new EnumProperty(Order.Action.class)</technical_language>

Target:
public Model getCREATEModel(Representation rep) { ModelImpl model = new ModelImpl() .property("encounter", new StringProperty().example("uuid")) .property("action", new StringProperty() ._enum(SwaggerSpecificationCreator.getEnumsAsList(Order.Action.class))) .property("accessionNumber", new StringProperty()) .property("dateActivated", new DateProperty()) .property("scheduledDate", new DateProperty()) .property("patient", new StringProperty().example("uuid")) .property("concept", new StringProperty().example("uuid")) .property("careSetting", new StringProperty().example("uuid")) .property("dateStopped", new DateProperty()) .property("autoExpireDate", new DateProperty()) .property("orderer", new StringProperty().example("uuid")) .property("previousOrder", new StringProperty().example("uuid")) .property("urgency", new StringProperty() ._enum(SwaggerSpecificationCreator.getEnumsAsList(Order.Urgency.class))) .property("orderReason", new StringProperty().example("uuid")) .property("orderReasonNonCoded", new StringProperty()) .property("instructions", new StringProperty()) .property("commentToFulfiller", new StringProperty()) .required("orderType").required("patient").required("concept"); if (rep instanceof FullRepresentation) { model .property("encounter", new RefProperty("#/definitions/EncounterCreate")) .property("patient", new RefProperty("#/definitions/PatientCreate")) .property("concept", new RefProperty("#/definitions/ConceptCreate")) .property("orderer", new RefProperty("#/definitions/UserCreate")) .property("previousOrder", new RefProperty("#/definitions/OrderCreate")) .property("orderReason", new RefProperty("#/definitions/ConceptCreate")); } return model; }