Add Generate Translations utility endpoint#53
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an OpenAPI path definition for a new utilities endpoint that generates the translations infrastructure for a source collection, and wires it into the root OpenAPI spec so it appears under /utils/translations/generate.
Changes:
- Added a new OpenAPI operation spec for
POST /utils/translations/generateincluding request/response schemas. - Added a path-level index file to expose the operation via
$ref. - Registered the new path in
openapi/index.yaml.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| openapi/paths/utils/translations/generate/translations-generate.yaml | Defines the request/response schema for the “generate translations collection” utilities operation. |
| openapi/paths/utils/translations/generate/index.yaml | Adds the post operation reference for the new endpoint path. |
| openapi/index.yaml | Registers /utils/translations/generate in the root paths map. |
Comments suppressed due to low confidence (1)
openapi/paths/utils/translations/generate/translations-generate.yaml:105
- All existing
/utils/*OpenAPI operations includex-codeSamples(Directus SDK + GraphQL / a "Not currently available" placeholder). This operation doesn’t include any code samples yet; please add them to keep the utilities docs consistent and to ensure generated docs have usage examples.
description: Successful request
tags:
- Utilities
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - created | ||
| - translationsCollection | ||
| - fields | ||
| description: Successful request |
There was a problem hiding this comment.
This new utils endpoint is missing the security: [] field that other utility operations consistently include (e.g., openapi/paths/utils/hash/generate/hash-generate.yaml and openapi/paths/utils/cache/clear/clear-cache.yaml). Please add it for consistency with the existing OpenAPI operation objects in this repo.
| description: Successful request | |
| description: Successful request | |
| security: [] |
| - fields | ||
| description: Successful request | ||
| tags: | ||
| - Utilities |
There was a problem hiding this comment.
Formatting nit: this file uses tags:\n - Utilities while the rest of the OpenAPI files in this repo typically use tags:\n- Utilities (no extra indentation). Consider matching the existing style to minimize diff churn and keep formatting consistent across generated specs.
| - Utilities | |
| - Utilities |
Adds spec for the generate translations collection utility endpoint
Core PR
https://github.com/directus/directus/pulls/bryantgillespie