This repository was archived by the owner on Jun 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Field Definition
Francis Pion edited this page Jan 20, 2025
·
5 revisions
ℹ️ Defines the fields/properties shared by contents of the same type.
| Name | Type | Cardinality | Description |
|---|---|---|---|
| Id | Guid | 1..1 | 🗝️ The unique identifier of the field. Should be used as the id HTML attribute. |
| ContentType | ContentType | 1..1 | The ContentType in which this field resides. |
| FieldType | FieldType | 1..1 | The FieldType associated to this field. |
| Order | Int32 | 1..1 | 🗝️ The order of the field within the content type. |
| IsInvariant | Boolean | 1..1 | A value indicating whether or not fields values can be translated. |
| IsRequired | Boolean | 1..1 | A value indicating whether or not a field value is required. |
| IsIndexed | Boolean | 1..1 | A value indicating whether or not field values are indexed (field value index table). |
| IsUnique | Boolean | 1..1 | A value indicating whether or not field values are unique within the content type (unique value index table). |
| UniqueName | String | 1..1 | 🗝️ The unique name of the field definition. Should be used as the name HTML attribute. |
| DisplayName | String | 0..1 | The display name of the field definition. Should be used as the field <label>. |
| Description | String | 0..1 | A textual description of the content type. Should be used as an HTML tooltip. |
| Placeholder | String | 0..1 | A short string describing the field to users. Should be used as the placeholder HTML attribute. |
❓
❓
❓
❓
❓
💡 Since the tables are separate, the booleans could be separate.
❓
❓
🚧 Should we provide queries for field definitions instead of simply working with the ContentType in which they exist?
❓
| Status | Method | URL | Description |
|---|---|---|---|
| 0% | DELETE | /api/contents/types/{contentTypeId}/fields/{fieldId} | Deletes a field definition. |
| 75% | PATCH | /api/contents/types/{contentTypeId}/fields/{fieldId} | Updates a field definition. |
| 75% | POST | /api/contents/types/{contentTypeId}/fields | Creates a new field definition. |
| 75% | PUT | /api/contents/types/{contentTypeId}/fields/{fieldId} | Creates or replaces a field definition. |