diff --git a/qqq-openapi/src/main/java/com/kingsrook/qqq/openapi/model/Schema.java b/qqq-openapi/src/main/java/com/kingsrook/qqq/openapi/model/Schema.java index 39707b83..ed08a513 100644 --- a/qqq-openapi/src/main/java/com/kingsrook/qqq/openapi/model/Schema.java +++ b/qqq-openapi/src/main/java/com/kingsrook/qqq/openapi/model/Schema.java @@ -92,7 +92,7 @@ public class Schema *******************************************************************************/ public void setType(Type type) { - this.type = type.toString().toLowerCase(); + this.type = type == null ? null : type.toString().toLowerCase(); } @@ -697,4 +697,14 @@ public class Schema return (this); } + + + /*************************************************************************** + ** + ***************************************************************************/ + public Schema withRefToSchema(String componentName) + { + return withRef("#/components/schemas/" + componentName); + } + }