-
-
Notifications
You must be signed in to change notification settings - Fork 534
Custom Schema Properties
Rico Suter edited this page Sep 27, 2016
·
7 revisions
- Package: NJsonSchema.Annotations
- Usages: The attribute is processed by the JsonSchemaGenerator
You can add custom properties to the JSON Schema with the JsonSchemaExtensionDataAttribute
attribute. Keep in mind that JSON Schema only allows x-
-prefixed property names.
The attribute can be used on properties and classes:
[JsonSchemaExtensionData("x-ui-color", "blue")]
public class Person
{
[JsonSchemaExtensionData("x-ui-multiline", "true")]
public string Description { get; set;}
}