CustomField
A model for defining custom fields on a record.
Data model
Property | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the custom field |
type | CustomFieldType | Yes | The JSON schema type to use when de-serializing the value |
schema | url | No | Link to the full JSON schema for this custom field |
value | any | Yes | Value of the custom field |
description | string | No | Description of the custom field’s purpose |
$schema: https://json-schema.org/draft/2020-12/schema$id: CustomField.yamltype: objectproperties: name: type: string description: Name of the custom field type: $ref: CustomFieldType.yaml description: The JSON schema type to use when de-serializing the value schema: type: string format: uri description: Link to the full JSON schema for this custom field value: description: Value of the custom field description: type: string description: Description of the custom field's purposerequired: - name - type - valuedescription: A custom field on a model
@doc("A custom field on a model")model CustomField { /** Name of the custom field */ name: string;
/** The JSON schema type to use when de-serializing the `value` field */ type: CustomFieldType;
/** Link to the full JSON schema for this custom field */ schema?: url;
/** Value of the custom field */ value: unknown;
/** Description of the custom field's purpose */ description?: string;}
{ "name": "programArea", "type": "string", "value": "Healthcare Innovation", "description": "Primary focus area of the grant program", "schema": "https://example.com/program-areas.json"}
CustomFieldType
The set of JSON schema types supported by a custom field.
Value | Description |
---|---|
string | Text values |
number | Numeric values |
boolean | True/false values |
object | Structured data objects |
array | Lists of values |
$schema: https://json-schema.org/draft/2020-12/schema$id: CustomFieldType.yamltype: stringenum: - string - number - boolean - object - arraydescription: The set of JSON schema types supported by a custom field
/** The set of JSON schema types supported by a custom field */enum CustomFieldType { string, number, boolean, object, array,}