Open Source Web Application Framework for ASP.NET Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

61 lines
1.8 KiB

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "form-field-descriptor.schema.json",
"title": "FormFieldDescriptor",
"description": "Describes a single field in a form",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for this field within the form",
"minLength": 1
},
"label": {
"type": "string",
"description": "Display label for the field",
"minLength": 1
},
"type": {
"$ref": "form-field-type.schema.json"
},
"binding": {
"type": ["string", "null"],
"description": "Entity property name to bind to, or null for unbound fields. Supports dotted paths like 'Parent.Name' for related entity display."
},
"enumType": {
"type": "string",
"description": "Full enum type name for select fields"
},
"defaultValue": {
"description": "Default value for the field"
},
"placeholder": {
"type": "string",
"description": "Placeholder text for the input"
},
"helpText": {
"type": "string",
"description": "Help text displayed below the field"
},
"readOnly": {
"type": "boolean",
"description": "Whether the field is read-only",
"default": false
},
"modeVisibility": {
"type": "string",
"enum": ["both", "createOnly", "editOnly"],
"description": "Controls in which form mode the field is visible",
"default": "both"
},
"validations": {
"type": "array",
"description": "Form-level validation rules (override or extend entity-level validators)",
"items": {
"$ref": "validator-descriptor.schema.json"
}
}
},
"required": ["id", "label", "type"],
"additionalProperties": false
}