Migrate locale endpoints from platform to nexus service#78
Merged
jeroenrinzema merged 4 commits intomainfrom Dec 1, 2025
Merged
Migrate locale endpoints from platform to nexus service#78jeroenrinzema merged 4 commits intomainfrom
jeroenrinzema merged 4 commits intomainfrom
Conversation
Copilot
AI
changed the title
[WIP] Migrate locale endpoints to nexus service
Migrate locale endpoints from platform to nexus service
Nov 30, 2025
There was a problem hiding this comment.
Pull request overview
This PR migrates four locale CRUD endpoints from the legacy TypeScript platform service to the Go-based nexus service. The migration follows nexus project conventions with OpenAPI-first design, separated store/controller layers, hard delete behavior, and comprehensive test coverage including testcontainers.
Key changes:
- OpenAPI schema definitions for
LocaleandCreateLocalewith four endpoints (GET list, POST create, GET by ID, DELETE) - Store layer with dual-lookup support (UUID or key) and query optimization
- Controller layer with project existence validation and proper HTTP status codes
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| services/nexus/oapi/resources.yml | Added locale endpoints and schemas to OpenAPI specification |
| services/nexus/oapi/resources_gen.go | Generated Go types and client code from OpenAPI spec |
| services/nexus/internal/store/locales.go | Implemented locale CRUD operations with dual-lookup GetLocale |
| services/nexus/internal/store/store.go | Registered LocalesStore in store aggregator |
| services/nexus/internal/http/controllers/v1/locales.go | Created locale controller with project validation and error handling |
| services/nexus/internal/http/controllers/v1/locales_test.go | Added comprehensive tests for all locale operations |
| services/nexus/internal/http/controllers/v1/controller.go | Registered LocalesController in main controller |
jeroenrinzema
approved these changes
Dec 1, 2025
Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
f6b710e to
999a385
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the four project locale CRUD endpoints from the legacy platform service (TypeScript) to the nexus service (Go).
Implementation
OpenAPI Specification (
oapi/resources.yml)/api/admin/projects/{projectID}/localesLocaleschema with id, project_id, key, label, timestampsCreateLocaleschema with key and label fieldsStore Layer (
internal/store/locales.go)project_idCOUNT(*) OVER ()deleted_atcolumn in schema)Controller Layer (
internal/http/controllers/v1/locales.go)/locales/{uuid}) and key (/locales/en)Tests (
internal/http/controllers/v1/locales_test.go)Query Optimization
This prevents
id::textconversion on every row during key-based lookups.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.