I want to create a schema from a custom object. A user object has some string properties; these properties are schematized with a type String|Null. How can I change JSonSchemaGeneratorto convert strings to input Stringinstead String|Null? In other words, if I serialize Jsonschema, I don't want this:
{
"title":"myObject",
"type":"object",
"properties":{
"ID":{
"required":true,
"type":["string","null"]
}
}
}
but this:
{
"title":"myObject",
"type":"object",
"properties":{
"ID":{
"required":true,
"type":"string"
}
}
}
source
share