Add attributes like this, then use FromType will get a perfect JSON schema:
"Hours": { "type": "number", "format": "decimal", "minimum": 0, "exclusiveMinimum": true }
But when calling jsonSchema.Validate(data), there will be no error for invalid value for this field.
Seems there isn't a step to check if JsonSchemaExtensionDataAttribute can be applied to real schema? Is that by design?
Add attributes like this, then use
FromType
will get a perfect JSON schema:"Hours": { "type": "number", "format": "decimal", "minimum": 0, "exclusiveMinimum": true }
But when callingjsonSchema.Validate(data)
, there will be no error for invalid value for this field. Seems there isn't a step to check ifJsonSchemaExtensionDataAttribute
can be applied to real schema? Is that by design?