Document required special flags per field type
Maintainers usually reply within 2 days
Nobody has claimed this yet.
- #28380 by @harshillvashisht — closed without merging
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 58/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- documentation
Research direction
The issue describes a Directus API behavior and points to api/src/services/fields.ts, api/src/constants.ts, and app/src/stores/fields.ts; first read those references and the docs contribution guidance to identify the relevant documentation page. Document the required special flags for each field type and explain the group alias behavior described here. Done when the docs make the required flags clear to API users.
Written by the indexing model from the issue text.
Description
Describe the Bug
GET /fields and GET /fields/{collection} omit alias fields whose meta.special is ['group']. The single-field endpoint returns the same field correctly. Directus Studio hydrates its fields store from bulk GET /fields, so group-accordion fields are missing from the form field definitions and fields nested under them are not rendered in item forms.
This was reproduced on Directus 12.3.1. The same ALIAS_TYPES filter was present in the source tags v12.4.0, v12.4.1, and v12.5.0.
To Reproduce
- Create a collection with an item form.
- Add a group field using the native
group-accordioninterface (type: "alias",meta.special: ["group"]). - Assign at least one ordinary field or alias field to that group using
meta.group: "group_opmaak". - Request
GET /fields/{collection}/group_opmaakandGET /fields/{collection}?limit=-1. - Open an item in Studio.
Expected Behavior
The group alias is included in bulk field metadata, and the item form renders the group and its child fields.
Actual Behavior
The single-field endpoint returns the group, but both bulk field endpoints omit it. The Studio item form does not render the group or its children.
For example, with a block_image collection:
GET /fields/block_image/group_opmaakreturnstype: "alias",meta.special: ["group"],meta.interface: "group-accordion",meta.hidden: false.GET /fields/block_image/usagesreturns a visiblelist-o2malias withmeta.group: "group_opmaak".GET /fields/block_image?limit=-1includesusagesbut omitsgroup_opmaak.- In a fresh Studio session, neither
group_opmaaknorusagesappears in the item form. Movingusagestemporarily to the collection root makes it render, confirming the relation itself is functional.
Additional Context
In api/src/services/fields.ts, FieldsService.readAll() filters alias fields by whether their special values match ALIAS_TYPES. In api/src/constants.ts, ALIAS_TYPES includes alias, o2m, m2m, m2a, o2a, files, and translations, but not group. The Studio field store hydrates from GET /fields (app/src/stores/fields.ts) and resolves group children from that store.
Source references:
- https://github.com/directus/directus/blob/v12.3.1/api/src/services/fields.ts
- https://github.com/directus/directus/blob/v12.3.1/api/src/constants.ts
- https://github.com/directus/directus/blob/v12.3.1/app/src/stores/fields.ts
- https://github.com/directus/directus/blob/v12.3.1/app/src/components/v-form/v-form.vue
Attempting to persist meta.special: ["alias", "group"] through the field API was normalized back to ["group"], so this is not currently configurable through the public field API.
- Dominant language
- TypeScript
- Stars
- 24
- Forks
- 90
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 19
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from directus/docs
-
Docs Platform
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
directus/docs#88 · 1 comment ·
Maintainers usually reply within 2 days
-
llms.txt links agents to /raw/ copies where partials are empty; the inlined .md copies aren't linkedOpen
Difficulty 3/5 1-2 days Newbie friendliness 67/100
directus/docs#865 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
directus/docs#771 · 3 comments ·
Maintainers usually reply within 2 days
-
content-improvement
Difficulty 5/5 Over a week Newbie friendliness 35/100
directus/docs#726 · 3 comments ·
Maintainers usually reply within 2 days
-
Document `Directus-File-Id header` for TUS needs `CORS_EXPOSED_HEADERS` set for external domainsMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
directus/docs#599 · 3 comments ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ranxianglei/billion-context#7597 ·
Maintainers usually reply within 1 day
-
kubernetes-ingestor: fetchCRDMapping() runs even when crossplane.enabled is false, logging a 403 ERROR every runPossibly taken @kc9ddi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TeraSky-OSS/backstage-plugins#228 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
zmkfirmware/zmk#3571 ·
Maintainers usually reply within 10 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPossibly taken @lijy91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
libnativeapi/nativeapi#53 · 1 reaction ·
Maintainers usually reply within 1 day