CE-1887 Add withRefToSchema; allow setType to set null

This commit is contained in:
2024-10-17 20:27:11 -05:00
parent cc55b32206
commit 678ecfd589

View File

@ -92,7 +92,7 @@ public class Schema
*******************************************************************************/ *******************************************************************************/
public void setType(Type type) 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); return (this);
} }
/***************************************************************************
**
***************************************************************************/
public Schema withRefToSchema(String componentName)
{
return withRef("#/components/schemas/" + componentName);
}
} }