diff --git a/omod-1.11/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_11/DrugIngredientResource1_11.java b/omod-1.11/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_11/DrugIngredientResource1_11.java index 514cfd167..0507e0cf4 100644 --- a/omod-1.11/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_11/DrugIngredientResource1_11.java +++ b/omod-1.11/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_11/DrugIngredientResource1_11.java @@ -17,6 +17,7 @@ import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Concept; import org.openmrs.Drug; import org.openmrs.DrugIngredient; @@ -91,7 +92,7 @@ public Schema getGETSchema(Representation rep) { Schema schema = super.getGETSchema(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { schema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("strength", new NumberSchema().format("double")); } diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/AllergyResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/AllergyResource1_8.java index 095c56b24..3555a713e 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/AllergyResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/AllergyResource1_8.java @@ -12,6 +12,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Patient; import org.openmrs.activelist.Allergy; import org.openmrs.activelist.AllergySeverity; @@ -88,7 +89,7 @@ public Schema getCREATESchema(Representation rep) { return new ObjectSchema() .addProperty("allergyType", new Schema().type("string")._enum(Arrays.asList(AllergyType.values()))) .addProperty("reaction", new ObjectSchema()) - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("severity", new Schema().type("string")._enum(Arrays.asList(AllergySeverity.values()))) .addProperty("allergen", new StringSchema()); } diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/BaseActiveListItemResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/BaseActiveListItemResource1_8.java index e54fa8d97..0e62732c6 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/BaseActiveListItemResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/BaseActiveListItemResource1_8.java @@ -15,6 +15,7 @@ import io.swagger.v3.oas.models.media.DateTimeSchema; import io.swagger.v3.oas.models.media.BooleanSchema; import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Obs; import org.openmrs.Person; import org.openmrs.activelist.ActiveListItem; @@ -39,7 +40,7 @@ public abstract class BaseActiveListItemResource1_8 ex @Override public Schema getGETSchema(Representation rep) { Schema schema = new ObjectSchema() - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("startDate", new DateTimeSchema()) .addProperty("endDate", new DateTimeSchema()) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/CohortResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/CohortResource1_8.java index 83a80ebd2..5c420e2fe 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/CohortResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/CohortResource1_8.java @@ -19,6 +19,7 @@ import io.swagger.v3.oas.models.media.IntegerSchema; import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.media.BooleanSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Cohort; import org.openmrs.api.context.Context; import org.openmrs.module.webservices.rest.web.RequestContext; @@ -99,7 +100,7 @@ public Schema getGETSchema(Representation rep) { Schema schema = super.getGETSchema(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { schema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("name", new StringSchema()) .addProperty("description", new StringSchema()) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptDatatypeResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptDatatypeResource1_8.java index 937cba458..103bf497c 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptDatatypeResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptDatatypeResource1_8.java @@ -12,6 +12,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.media.BooleanSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.ConceptDatatype; import org.openmrs.api.context.Context; import org.openmrs.module.webservices.rest.SimpleObject; @@ -71,7 +72,7 @@ public Schema getGETSchema(Representation rep) { Schema schema = super.getGETSchema(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { schema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("name", new StringSchema()) .addProperty("description", new StringSchema()) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptDescriptionResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptDescriptionResource1_8.java index 928389a1f..629790dff 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptDescriptionResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptDescriptionResource1_8.java @@ -16,6 +16,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Concept; import org.openmrs.ConceptDescription; import org.openmrs.api.context.Context; @@ -73,17 +74,17 @@ public Schema getGETSchema(Representation rep) { Schema schema = new ObjectSchema(); if (rep instanceof RefRepresentation) { schema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()); } else if (rep instanceof DefaultRepresentation) { schema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("description", new StringSchema()) .addProperty("locale", new StringSchema()); } else if (rep instanceof FullRepresentation) { schema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("description", new StringSchema()) .addProperty("locale", new StringSchema()); diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptMapResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptMapResource1_8.java index 3dd0234e3..acb84568a 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptMapResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptMapResource1_8.java @@ -16,6 +16,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Concept; import org.openmrs.ConceptMap; import org.openmrs.api.context.Context; @@ -72,13 +73,13 @@ public Schema getGETSchema(Representation rep) { if (rep instanceof DefaultRepresentation) { schema .addProperty("display", new StringSchema()) - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("source", new Schema().$ref("#/components/schemas/ConceptSourceGetRef")) .addProperty("sourceCode", new StringSchema()); } else if (rep instanceof FullRepresentation) { schema .addProperty("display", new StringSchema()) - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("source", new Schema().$ref("#/components/schemas/ConceptSourceGet")) .addProperty("sourceCode", new StringSchema()) .addProperty("comment", new StringSchema()); diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptNameResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptNameResource1_8.java index e84baaa04..0aec0c552 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptNameResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptNameResource1_8.java @@ -19,6 +19,7 @@ import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.media.BooleanSchema; import io.swagger.v3.oas.models.media.DateTimeSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Concept; import org.openmrs.ConceptName; import org.openmrs.api.ConceptNameType; @@ -83,11 +84,11 @@ public Schema getGETSchema(Representation rep) { Schema schema = new ObjectSchema(); if (rep instanceof RefRepresentation) { schema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()); } else if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { schema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("name", new StringSchema()) .addProperty("locale", new StringSchema().example("en")) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptResource1_8.java index 65cf016cb..54c6faf52 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptResource1_8.java @@ -14,6 +14,7 @@ import io.swagger.v3.oas.models.media.BooleanSchema; import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.apache.commons.lang.StringUtils; import org.openmrs.Concept; import org.openmrs.ConceptAnswer; @@ -219,7 +220,7 @@ public Schema getGETSchema(Representation rep) { Schema schema = new ObjectSchema(); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { schema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("name", new Schema().$ref("#/components/schemas/ConceptNameGet")) .addProperty("datatype", new Schema().$ref("#/components/schemas/ConceptdatatypeGetRef")) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptSourceResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptSourceResource1_8.java index ce958ad57..74620822f 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptSourceResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptSourceResource1_8.java @@ -13,6 +13,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; import io.swagger.v3.oas.models.media.BooleanSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.ConceptSource; import org.openmrs.api.context.Context; import org.openmrs.module.webservices.rest.web.RequestContext; @@ -76,7 +77,7 @@ public Schema getGETSchema(Representation rep) { Schema schema = super.getGETSchema(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { schema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("name", new StringSchema()) .addProperty("description", new StringSchema()) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/DrugResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/DrugResource1_8.java index 25bf2cd72..9dbf23589 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/DrugResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/DrugResource1_8.java @@ -13,6 +13,7 @@ import io.swagger.v3.oas.models.media.BooleanSchema; import io.swagger.v3.oas.models.media.NumberSchema; import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Drug; import org.openmrs.api.context.Context; import org.openmrs.module.webservices.rest.web.RequestContext; @@ -123,7 +124,7 @@ public Schema getGETSchema(Representation rep) { if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { schema .addProperty("display", new StringSchema()) - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("name", new StringSchema()) .addProperty("description", new StringSchema()) .addProperty("retired", new BooleanSchema()) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/FormFieldResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/FormFieldResource1_8.java index 3e03f7f86..0ce5aeaa1 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/FormFieldResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/FormFieldResource1_8.java @@ -19,6 +19,7 @@ import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Field; import org.openmrs.Form; import org.openmrs.FormField; @@ -47,7 +48,7 @@ public Schema getGETSchema(Representation rep) { Schema modelImpl = super.getGETSchema(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { modelImpl - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("fieldNumber", new IntegerSchema()) .addProperty("fieldPart", new StringSchema()) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/HL7MessageResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/HL7MessageResource1_8.java index 5fbd5d7cc..fffb4cdc0 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/HL7MessageResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/HL7MessageResource1_8.java @@ -13,6 +13,7 @@ import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.api.context.Context; import org.openmrs.hl7.HL7Source; import org.openmrs.module.webservices.rest.web.RequestContext; @@ -103,12 +104,12 @@ public Schema getGETSchema(Representation rep) { ObjectSchema objectSchema = (ObjectSchema) schema; if (rep instanceof DefaultRepresentation) { objectSchema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("messageState", new IntegerSchema()); } else if (rep instanceof FullRepresentation) { objectSchema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("source", new Schema().$ref("#/components/schemas/Hl7sourceGet")) .addProperty("sourceKey", new StringSchema()) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ModuleResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ModuleResource1_8.java index a3352d912..35d321061 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ModuleResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ModuleResource1_8.java @@ -14,6 +14,7 @@ import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.apache.commons.io.FileUtils; import org.openmrs.module.Module; import org.openmrs.module.ModuleException; @@ -112,7 +113,7 @@ public Schema getGETSchema(Representation rep) { Schema model = super.getGETSchema(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("name", new StringSchema()) .addProperty("description", new StringSchema()) @@ -129,7 +130,7 @@ public Schema getGETSchema(Representation rep) { .addProperty("requiredModules", new ArraySchema().items(new StringSchema())); } else if (rep instanceof RefRepresentation) { model - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()); } return model; diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/OrderResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/OrderResource1_8.java index 559c86fa0..308629bdc 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/OrderResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/OrderResource1_8.java @@ -17,6 +17,7 @@ import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Concept; import org.openmrs.Encounter; import org.openmrs.Order; @@ -218,7 +219,7 @@ public Schema getGETSchema(Representation rep) { Schema model = super.getGETSchema(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("instructions", new StringSchema()) .addProperty("startDate", new DateSchema()) @@ -236,7 +237,7 @@ public Schema getGETSchema(Representation rep) { .addProperty("encounter", new Schema().$ref("#/components/schemas/EncounterGet")) .addProperty("orderer", new Schema().$ref("#/components/schemas/UserGet")) .addProperty("discontinuedBy", new Schema().$ref("#/components/schemas/UserGet")) - .addProperty("discontinuedReason", new Schema().$ref("#/components/schemas.ConceptGet")); + .addProperty("discontinuedReason", new Schema().$ref("#/components/schemas/ConceptGet")); } else if (rep instanceof FullRepresentation) { model .addProperty("orderType", new Schema().$ref("#/components/schemas/OrdertypeGetFull")) @@ -245,7 +246,7 @@ public Schema getGETSchema(Representation rep) { .addProperty("encounter", new Schema().$ref("#/components/schemas/EncounterGetFull")) .addProperty("orderer", new Schema().$ref("#/components/schemas/UserGetFull")) .addProperty("discontinuedBy", new Schema().$ref("#/components/schemas/UserGetFull")) - .addProperty("discontinuedReason", new Schema().$ref("#/components/schemas.ConceptGetFull")); + .addProperty("discontinuedReason", new Schema().$ref("#/components/schemas/ConceptGetFull")); } return model; } diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PatientIdentifierResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PatientIdentifierResource1_8.java index 55f2c2bac..febcda757 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PatientIdentifierResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PatientIdentifierResource1_8.java @@ -17,6 +17,7 @@ import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.apache.commons.lang3.StringUtils; import org.openmrs.Location; import org.openmrs.Patient; @@ -139,7 +140,7 @@ public Schema getGETSchema(Representation rep) { Schema model = super.getGETSchema(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("identifier", new StringSchema()) .addProperty("preferred", new BooleanSchema()._default(false)) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PatientResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PatientResource1_8.java index bd076ddb9..55aa8d0f5 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PatientResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PatientResource1_8.java @@ -14,6 +14,7 @@ import io.swagger.v3.oas.models.media.BooleanSchema; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Patient; import org.openmrs.PatientIdentifier; import org.openmrs.Person; @@ -149,7 +150,7 @@ public Schema getGETSchema(Representation rep) { if (schema instanceof ObjectSchema && (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation)) { ObjectSchema objectSchema = (ObjectSchema) schema; objectSchema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("identifiers", new ArraySchema().items(new Schema().$ref("#/components/schemas/PatientIdentifierGetRef"))) .addProperty("preferred", new BooleanSchema()._default(false)) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PatientStateResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PatientStateResource1_8.java index 21594280c..92c8df8ba 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PatientStateResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PatientStateResource1_8.java @@ -14,6 +14,7 @@ import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.PatientProgram; import org.openmrs.PatientState; import org.openmrs.ProgramWorkflow; @@ -177,7 +178,7 @@ public Schema getGETSchema(Representation rep) { Schema model = super.getGETSchema(rep); if (rep instanceof RefRepresentation || rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("startDate", new DateSchema()) .addProperty("endDate", new DateSchema()) .addProperty("voided", new BooleanSchema()); diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PersonAttributeResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PersonAttributeResource1_8.java index 212f45acb..3bb22cd06 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PersonAttributeResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PersonAttributeResource1_8.java @@ -13,6 +13,7 @@ import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Attributable; import org.openmrs.Location; import org.openmrs.Person; @@ -159,14 +160,14 @@ public Schema getGETSchema(Representation rep) { if (rep instanceof DefaultRepresentation) { model .addProperty("display", new StringSchema()) - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("value", new StringSchema()) .addProperty("attributeType", new Schema().$ref("#/components/schemas/PersonattributetypeGet")) .addProperty("voided", new BooleanSchema()); } else if (rep instanceof FullRepresentation) { model .addProperty("display", new StringSchema()) - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("value", new StringSchema()) .addProperty("attributeType", new Schema().$ref("#/components/schemas/PersonattributetypeGetFull")) .addProperty("voided", new BooleanSchema()) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PersonNameResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PersonNameResource1_8.java index a1a988826..cbda464eb 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PersonNameResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PersonNameResource1_8.java @@ -13,6 +13,7 @@ import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Person; import org.openmrs.PersonName; import org.openmrs.api.context.Context; @@ -112,7 +113,7 @@ public Schema getGETSchema(Representation rep) { if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model .addProperty("display", new StringSchema()) - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("givenName", new StringSchema()) .addProperty("middleName", new StringSchema()) .addProperty("familyName", new StringSchema()) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PersonResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PersonResource1_8.java index 1dd631b21..41496912d 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PersonResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/PersonResource1_8.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.IntegerSchema; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Person; import org.openmrs.PersonAddress; import org.openmrs.PersonAttribute; @@ -146,7 +147,7 @@ public Schema getGETSchema(Representation rep) { if (schema instanceof ObjectSchema && (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation)) { ObjectSchema objectSchema = (ObjectSchema) schema; objectSchema - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("gender", new StringSchema()._enum(Arrays.asList("M", "F"))) .addProperty("age", new IntegerSchema()) diff --git a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/RelationshipResource1_8.java b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/RelationshipResource1_8.java index 029f18d96..b64e5c521 100644 --- a/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/RelationshipResource1_8.java +++ b/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/RelationshipResource1_8.java @@ -14,6 +14,7 @@ import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.UUIDSchema; import org.openmrs.Person; import org.openmrs.Relationship; import org.openmrs.RelationshipType; @@ -167,7 +168,7 @@ public Schema getGETSchema(Representation rep) { Schema model = super.getGETSchema(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model - .addProperty("uuid", new StringSchema()) + .addProperty("uuid", new UUIDSchema()) .addProperty("display", new StringSchema()) .addProperty("voided", new BooleanSchema()); } diff --git a/omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerSpecificationCreator.java b/omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerSpecificationCreator.java index 93fcacacb..c3b308801 100644 --- a/omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerSpecificationCreator.java +++ b/omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerSpecificationCreator.java @@ -189,6 +189,7 @@ private void addDefaultDefinitions() { openAPI.setComponents(components); } + @SuppressWarnings("unchecked") private void toggleLogs(boolean targetState) { if (Context.getAdministrationService().getGlobalProperty(SwaggerConstants.SWAGGER_QUIET_DOCS_GLOBAL_PROPERTY_NAME) .equals("true")) {