Skip to content

Commit 9b0b984

Browse files
committed
uuid should be a uuidschema
1 parent 70dbaf0 commit 9b0b984

23 files changed

+54
-31
lines changed

omod-1.11/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_11/DrugIngredientResource1_11.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import io.swagger.v3.oas.models.media.ObjectSchema;
1818
import io.swagger.v3.oas.models.media.Schema;
1919
import io.swagger.v3.oas.models.media.StringSchema;
20+
import io.swagger.v3.oas.models.media.UUIDSchema;
2021
import org.openmrs.Concept;
2122
import org.openmrs.Drug;
2223
import org.openmrs.DrugIngredient;
@@ -91,7 +92,7 @@ public Schema<?> getGETSchema(Representation rep) {
9192
Schema<?> schema = super.getGETSchema(rep);
9293
if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) {
9394
schema
94-
.addProperty("uuid", new StringSchema())
95+
.addProperty("uuid", new UUIDSchema())
9596
.addProperty("display", new StringSchema())
9697
.addProperty("strength", new NumberSchema().format("double"));
9798
}

omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/AllergyResource1_8.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import io.swagger.v3.oas.models.media.Schema;
1313
import io.swagger.v3.oas.models.media.StringSchema;
1414
import io.swagger.v3.oas.models.media.ObjectSchema;
15+
import io.swagger.v3.oas.models.media.UUIDSchema;
1516
import org.openmrs.Patient;
1617
import org.openmrs.activelist.Allergy;
1718
import org.openmrs.activelist.AllergySeverity;
@@ -88,7 +89,7 @@ public Schema<?> getCREATESchema(Representation rep) {
8889
return new ObjectSchema()
8990
.addProperty("allergyType", new Schema<AllergyType>().type("string")._enum(Arrays.asList(AllergyType.values())))
9091
.addProperty("reaction", new ObjectSchema())
91-
.addProperty("uuid", new StringSchema())
92+
.addProperty("uuid", new UUIDSchema())
9293
.addProperty("severity", new Schema<AllergySeverity>().type("string")._enum(Arrays.asList(AllergySeverity.values())))
9394
.addProperty("allergen", new StringSchema());
9495
}

omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/BaseActiveListItemResource1_8.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import io.swagger.v3.oas.models.media.DateTimeSchema;
1616
import io.swagger.v3.oas.models.media.BooleanSchema;
1717
import io.swagger.v3.oas.models.media.ObjectSchema;
18+
import io.swagger.v3.oas.models.media.UUIDSchema;
1819
import org.openmrs.Obs;
1920
import org.openmrs.Person;
2021
import org.openmrs.activelist.ActiveListItem;
@@ -39,7 +40,7 @@ public abstract class BaseActiveListItemResource1_8<T extends ActiveListItem> ex
3940
@Override
4041
public Schema<?> getGETSchema(Representation rep) {
4142
Schema<?> schema = new ObjectSchema()
42-
.addProperty("uuid", new StringSchema())
43+
.addProperty("uuid", new UUIDSchema())
4344
.addProperty("display", new StringSchema())
4445
.addProperty("startDate", new DateTimeSchema())
4546
.addProperty("endDate", new DateTimeSchema())

omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/CohortResource1_8.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import io.swagger.v3.oas.models.media.IntegerSchema;
2020
import io.swagger.v3.oas.models.media.StringSchema;
2121
import io.swagger.v3.oas.models.media.BooleanSchema;
22+
import io.swagger.v3.oas.models.media.UUIDSchema;
2223
import org.openmrs.Cohort;
2324
import org.openmrs.api.context.Context;
2425
import org.openmrs.module.webservices.rest.web.RequestContext;
@@ -99,7 +100,7 @@ public Schema<?> getGETSchema(Representation rep) {
99100
Schema<?> schema = super.getGETSchema(rep);
100101
if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) {
101102
schema
102-
.addProperty("uuid", new StringSchema())
103+
.addProperty("uuid", new UUIDSchema())
103104
.addProperty("display", new StringSchema())
104105
.addProperty("name", new StringSchema())
105106
.addProperty("description", new StringSchema())

omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptDatatypeResource1_8.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import io.swagger.v3.oas.models.media.Schema;
1313
import io.swagger.v3.oas.models.media.StringSchema;
1414
import io.swagger.v3.oas.models.media.BooleanSchema;
15+
import io.swagger.v3.oas.models.media.UUIDSchema;
1516
import org.openmrs.ConceptDatatype;
1617
import org.openmrs.api.context.Context;
1718
import org.openmrs.module.webservices.rest.SimpleObject;
@@ -71,7 +72,7 @@ public Schema<?> getGETSchema(Representation rep) {
7172
Schema<?> schema = super.getGETSchema(rep);
7273
if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) {
7374
schema
74-
.addProperty("uuid", new StringSchema())
75+
.addProperty("uuid", new UUIDSchema())
7576
.addProperty("display", new StringSchema())
7677
.addProperty("name", new StringSchema())
7778
.addProperty("description", new StringSchema())

omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptDescriptionResource1_8.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import io.swagger.v3.oas.models.media.Schema;
1717
import io.swagger.v3.oas.models.media.StringSchema;
1818
import io.swagger.v3.oas.models.media.ObjectSchema;
19+
import io.swagger.v3.oas.models.media.UUIDSchema;
1920
import org.openmrs.Concept;
2021
import org.openmrs.ConceptDescription;
2122
import org.openmrs.api.context.Context;
@@ -73,17 +74,17 @@ public Schema<?> getGETSchema(Representation rep) {
7374
Schema<?> schema = new ObjectSchema();
7475
if (rep instanceof RefRepresentation) {
7576
schema
76-
.addProperty("uuid", new StringSchema())
77+
.addProperty("uuid", new UUIDSchema())
7778
.addProperty("display", new StringSchema());
7879
} else if (rep instanceof DefaultRepresentation) {
7980
schema
80-
.addProperty("uuid", new StringSchema())
81+
.addProperty("uuid", new UUIDSchema())
8182
.addProperty("display", new StringSchema())
8283
.addProperty("description", new StringSchema())
8384
.addProperty("locale", new StringSchema());
8485
} else if (rep instanceof FullRepresentation) {
8586
schema
86-
.addProperty("uuid", new StringSchema())
87+
.addProperty("uuid", new UUIDSchema())
8788
.addProperty("display", new StringSchema())
8889
.addProperty("description", new StringSchema())
8990
.addProperty("locale", new StringSchema());

omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptMapResource1_8.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import io.swagger.v3.oas.models.media.Schema;
1717
import io.swagger.v3.oas.models.media.StringSchema;
1818
import io.swagger.v3.oas.models.media.ObjectSchema;
19+
import io.swagger.v3.oas.models.media.UUIDSchema;
1920
import org.openmrs.Concept;
2021
import org.openmrs.ConceptMap;
2122
import org.openmrs.api.context.Context;
@@ -72,13 +73,13 @@ public Schema<?> getGETSchema(Representation rep) {
7273
if (rep instanceof DefaultRepresentation) {
7374
schema
7475
.addProperty("display", new StringSchema())
75-
.addProperty("uuid", new StringSchema())
76+
.addProperty("uuid", new UUIDSchema())
7677
.addProperty("source", new Schema<Object>().$ref("#/components/schemas/ConceptSourceGetRef"))
7778
.addProperty("sourceCode", new StringSchema());
7879
} else if (rep instanceof FullRepresentation) {
7980
schema
8081
.addProperty("display", new StringSchema())
81-
.addProperty("uuid", new StringSchema())
82+
.addProperty("uuid", new UUIDSchema())
8283
.addProperty("source", new Schema<Object>().$ref("#/components/schemas/ConceptSourceGet"))
8384
.addProperty("sourceCode", new StringSchema())
8485
.addProperty("comment", new StringSchema());

omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptNameResource1_8.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import io.swagger.v3.oas.models.media.StringSchema;
2020
import io.swagger.v3.oas.models.media.BooleanSchema;
2121
import io.swagger.v3.oas.models.media.DateTimeSchema;
22+
import io.swagger.v3.oas.models.media.UUIDSchema;
2223
import org.openmrs.Concept;
2324
import org.openmrs.ConceptName;
2425
import org.openmrs.api.ConceptNameType;
@@ -83,11 +84,11 @@ public Schema<?> getGETSchema(Representation rep) {
8384
Schema<?> schema = new ObjectSchema();
8485
if (rep instanceof RefRepresentation) {
8586
schema
86-
.addProperty("uuid", new StringSchema())
87+
.addProperty("uuid", new UUIDSchema())
8788
.addProperty("display", new StringSchema());
8889
} else if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) {
8990
schema
90-
.addProperty("uuid", new StringSchema())
91+
.addProperty("uuid", new UUIDSchema())
9192
.addProperty("display", new StringSchema())
9293
.addProperty("name", new StringSchema())
9394
.addProperty("locale", new StringSchema().example("en"))

omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptResource1_8.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import io.swagger.v3.oas.models.media.BooleanSchema;
1515
import io.swagger.v3.oas.models.media.StringSchema;
1616
import io.swagger.v3.oas.models.media.ObjectSchema;
17+
import io.swagger.v3.oas.models.media.UUIDSchema;
1718
import org.apache.commons.lang.StringUtils;
1819
import org.openmrs.Concept;
1920
import org.openmrs.ConceptAnswer;
@@ -219,7 +220,7 @@ public Schema<?> getGETSchema(Representation rep) {
219220
Schema<?> schema = new ObjectSchema();
220221
if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) {
221222
schema
222-
.addProperty("uuid", new StringSchema())
223+
.addProperty("uuid", new UUIDSchema())
223224
.addProperty("display", new StringSchema())
224225
.addProperty("name", new Schema<Object>().$ref("#/components/schemas/ConceptNameGet"))
225226
.addProperty("datatype", new Schema<Object>().$ref("#/components/schemas/ConceptdatatypeGetRef"))

omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_8/ConceptSourceResource1_8.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import io.swagger.v3.oas.models.media.Schema;
1414
import io.swagger.v3.oas.models.media.StringSchema;
1515
import io.swagger.v3.oas.models.media.BooleanSchema;
16+
import io.swagger.v3.oas.models.media.UUIDSchema;
1617
import org.openmrs.ConceptSource;
1718
import org.openmrs.api.context.Context;
1819
import org.openmrs.module.webservices.rest.web.RequestContext;
@@ -76,7 +77,7 @@ public Schema<?> getGETSchema(Representation rep) {
7677
Schema<?> schema = super.getGETSchema(rep);
7778
if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) {
7879
schema
79-
.addProperty("uuid", new StringSchema())
80+
.addProperty("uuid", new UUIDSchema())
8081
.addProperty("display", new StringSchema())
8182
.addProperty("name", new StringSchema())
8283
.addProperty("description", new StringSchema())

0 commit comments

Comments
 (0)