Add GET /apps/{app-id}/is-located-on endpoint#299
Merged
bburda merged 3 commits intoselfpatch:mainfrom Mar 21, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new discovery relationship endpoint to the ROS 2 Medkit Gateway REST API: GET /apps/{app-id}/is-located-on, allowing clients to resolve an App’s host Component (the inverse of /components/{id}/hosts).
Changes:
- Register
GET /apps/{app-id}/is-located-oninRESTServer::setup_routes(). - Implement
DiscoveryHandlers::handle_app_is_located_on()to return a 0-or-1itemslist with_linksandx-medkit.total_count. - Add/extend unit + gateway HTTP tests for success, empty result, invalid ID, and unknown app cases.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ros2_medkit_gateway/src/http/rest_server.cpp | Registers the new /is-located-on route for apps. |
| src/ros2_medkit_gateway/src/http/handlers/discovery_handlers.cpp | Implements the new handler logic and response envelope. |
| src/ros2_medkit_gateway/include/ros2_medkit_gateway/http/handlers/discovery_handlers.hpp | Declares the new handler method. |
| src/ros2_medkit_gateway/test/test_discovery_handlers.cpp | Adds unit tests for the new relationship endpoint and adjusts seeded manifest expectations. |
| src/ros2_medkit_gateway/test/test_gateway_node.cpp | Adds an HTTP-level test and a manifest fixture for the new endpoint. |
bburda
reviewed
Mar 21, 2026
bburda
approved these changes
Mar 21, 2026
Collaborator
bburda
left a comment
There was a problem hiding this comment.
Thanks for this PR! LGTM!
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.
Pull Request
Summary
GET /apps/{app-id}/is-located-ondiscovery route and handleritemsresponse, includingx-medkit.missing=truewhen an unresolved host reference is encounteredIssue
Link the related issue (required):
GET /apps/{app-id}/is-located-onendpoint #195Type
Testing
source /opt/ros/jazzy/setup.bash && colcon build --packages-up-to ros2_medkit_integration_tests --build-base build-dev195 --install-base install-dev195source /opt/ros/jazzy/setup.bash && source install-dev195/setup.bash && colcon test --packages-select ros2_medkit_gateway --build-base build-dev195 --install-base install-dev195colcon test-result --verbose --test-result-base build-dev195/ros2_medkit_gateway(2119 tests, 0 errors, 0 failures, 244 skipped)source /opt/ros/jazzy/setup.bash && source install-dev195/setup.bash && colcon test --packages-select ros2_medkit_integration_tests --build-base build-dev195 --install-base install-dev195 --ctest-args -R "test_health|test_hateoas" --output-on-failurecolcon test-result --verbose --test-result-base build-dev195/ros2_medkit_integration_tests(27 tests, 0 errors, 0 failures, 0 skipped)Checklist