Migrate tags endpoints to nexus service#76
Merged
jeroenrinzema merged 7 commits intomainfrom Dec 1, 2025
Merged
Conversation
Copilot
AI
changed the title
[WIP] Migrate tags endpoints to nexus service
Migrate tags endpoints to nexus service
Nov 30, 2025
There was a problem hiding this comment.
Pull request overview
This PR migrates the core tags CRUD operations from the legacy platform service to nexus, following the established OpenAPI-first architecture. The migration adds 5 RESTful endpoints for managing tags (list, create, get, update, delete) with proper multi-tenant isolation, search functionality, and pagination support.
Key changes:
- Defined OpenAPI specification for tag endpoints and schemas
- Implemented store layer with SQL injection protection for search queries
- Created controller layer with comprehensive error handling and logging
- Added testcontainer-based integration tests covering success and error scenarios
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| services/nexus/oapi/resources.yml | Defines 5 tag endpoints with OpenAPI specs including Tag, CreateTag, UpdateTag schemas and TagListResponse |
| services/nexus/oapi/resources_gen.go | Auto-generated Go types and client methods from OpenAPI specification |
| services/nexus/internal/store/tags.go | Store layer implementing CRUD operations with ILIKE pattern escaping and RowsAffected validation |
| services/nexus/internal/store/store.go | Registers TagsStore in the stores collection |
| services/nexus/internal/http/controllers/v1/tags.go | Controller handlers for all tag endpoints with structured logging |
| services/nexus/internal/http/controllers/v1/tags_test.go | Integration tests using testcontainers covering all CRUD operations |
| services/nexus/internal/http/controllers/v1/controller.go | Adds TagsController to main controller struct |
Contributor
|
@copilot apply changes based on the comments in this thread |
Contributor
Author
Applied all review comments in commit f4faf74:
All tests passing. The |
jeroenrinzema
requested changes
Nov 30, 2025
…ler and tests Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
…timize database queries Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
…ve unnecessary project check Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
…ern comment Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
…d checks Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
6368635 to
215177e
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.
params.Search.ToString()directlyescapeILIKEPatternfunction and its usageRowsAffectedchecks from UpdateTag and DeleteTagChanges Made
Controller Layer (
tags.go)params.Search.ToString()directly instead of nil checkingStore Layer (
tags.go)escapeILIKEPatterncall - search is used directly in ILIKE queryRowsAffectedcheck - operation succeeds even if no rows affectedRowsAffectedcheck - operation succeeds even if no rows affected (idempotent)escapeILIKEPatternfunction entirelystringsimportTests (
tags_test.go)Behavior Changes
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.