Refactor missing object routes to use BaseTableRouteHandler pattern#224
Merged
Refactor missing object routes to use BaseTableRouteHandler pattern#224
Conversation
…ler.MapRoutes Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>
…emove redundant MapRoutes Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>
Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>
Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>
Co-authored-by: LeftofZen <7483209+LeftofZen@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add ObjectMissingRouteHandler for missing routes
Refactor missing object routes to use BaseTableRouteHandler pattern
Dec 28, 2025
f9d3e2d to
a78710b
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the missing object routes (/v2/objects/missing) to use the ITableRouteHandler pattern instead of manual route mapping, improving consistency with other route handlers in the codebase.
Key Changes:
- Created
ObjectMissingRouteHandlerimplementingITableRouteHandlerwith full CRUD operations - Migrated
ListMissingObjectsandAddMissingObjectfromObjectRouteHandlerto the new handler - Added implementations for Read and Delete operations; Update returns 501 Not Implemented
- Created
DtoMissingObjectEntryComparerfor comparing missing object entries
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| ObjectService/RouteHandlers/TableHandlers/ObjectMissingRouteHandler.cs | New route handler implementing ITableRouteHandler pattern for missing objects with List, Create, Read, Update (stub), and Delete operations |
| ObjectService/RouteHandlers/TableHandlers/ObjectRouteHandler.cs | Removed manual route mapping for missing objects and replaced with BaseTableRouteHandler.MapRoutes call |
| Definitions/DTO/Comparers/DtoMissingObjectEntryComparer.cs | New comparer for DtoMissingObjectEntry based on DatName, DatChecksum, and ObjectType |
| Tests/ObjectServiceIntegrationTests/ObjectMissingRoutesTest.cs | Stub test file with TODO for future test implementation |
ObjectService/RouteHandlers/TableHandlers/ObjectMissingRouteHandler.cs
Outdated
Show resolved
Hide resolved
ObjectService/RouteHandlers/TableHandlers/ObjectMissingRouteHandler.cs
Outdated
Show resolved
Hide resolved
…thub.com/OpenLoco/ObjectEditor into copilot/add-object-missing-route-handler
…ndler.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
The
/objects/missingroutes were manually mapped inObjectRouteHandler.MapAdditionalRoutes()instead of following theITableRouteHandlerpattern used by other route handlers.Changes
Created
ObjectMissingRouteHandlerITableRouteHandlerwithBaseRoute = "/missing"ListMissingObjectsandAddMissingObjectmethods fromObjectRouteHandlerUpdated
ObjectRouteHandler.MapAdditionalRoutesMapGet/MapPostcalls withBaseTableRouteHandler.MapRoutes<ObjectMissingRouteHandler>(parentRoute)Example
Before:
After:
API routes unchanged:
GET/POST /v2/objects/missingWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
av-build-tel-api-v1.avaloniaui.net/usr/share/dotnet/dotnet dotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.1/tools/netstandard2.0/runtimeconfig.json /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.1/tools/netstandard2.0/Avalonia.BuildServices.Collector.dll(dns block)/usr/share/dotnet/dotnet dotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.2/tools/netstandard2.0/runtimeconfig.json /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.2/tools/netstandard2.0/Avalonia.BuildServices.Collector.dll(dns block)/usr/share/dotnet/dotnet dotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.1/tools/netstandard2.0/runtimeconfig.json /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.1/tools/netstandard2.0/Avalonia.BuildServices.Collector.dll rs/ObjectMissingRouteHandler.cs ctService/RouteH--logger:console;verbosity=normal ctService/RouteH/home/REDACTED/work/ObjectEditor/ObjectEditor/Tests/bin/Release/net10.0/Tests.dll ctService/RouteHbash ctService/RouteH--norc ctService/RouteH--noprofile ctService/RouteHandlers/TableHan/nologo ctSe�� ctService/RouteHandlers/TableHan/nodeReuse:true /netstandard2.0/runtimeconfig.json /netstandard2.0/Avalonia.BuildServices.Collector.dll ctService/RouteHbash ctService/RouteH--norc ctService/RouteH--noprofile ctService/RouteHandlers/BaseData/nologo(dns block)If you need me to access, download, or install something from one of these locations, you can either:
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.