Skip to content

Add Generate Translations utility endpoint#53

Open
bryantgillespie wants to merge 2 commits intomainfrom
bry/gen-translations-collection
Open

Add Generate Translations utility endpoint#53
bryantgillespie wants to merge 2 commits intomainfrom
bry/gen-translations-collection

Conversation

@bryantgillespie
Copy link
Member

Adds spec for the generate translations collection utility endpoint

Core PR
https://github.com/directus/directus/pulls/bryantgillespie

Copilot AI review requested due to automatic review settings March 2, 2026 21:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/generate including 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 include x-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
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
description: Successful request
description: Successful request
security: []

Copilot uses AI. Check for mistakes.
- fields
description: Successful request
tags:
- Utilities
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- Utilities
- Utilities

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants