Skip to content

Conversation

@mfaferek93
Copy link
Collaborator

@mfaferek93 mfaferek93 commented Nov 23, 2025

Add endpoint to list all discovered components across all areas.

Changes:

  • Add GET /components REST endpoint in rest_server.cpp
  • Implement handle_list_components() to return component metadata
  • Add test_03_list_components integration test
  • Update README with API reference and endpoint documentation
  • Update Postman collection with new endpoint

Pull Request

Description

What changed and why.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Related issues

Fixes # (if applicable)
Related to # (if applicable)

How has this been tested?

Describe the tests you ran to verify your changes.

Checklist

  • My code follows the project's coding style
  • I ran colcon build and the build succeeds without warnings
  • I ran colcon test and all tests pass locally
  • I added/updated tests where applicable
  • I updated documentation where applicable
  • My commit messages are clear and descriptive

Additional notes for reviewers

@mfaferek93 mfaferek93 self-assigned this Nov 23, 2025
@mfaferek93 mfaferek93 added the enhancement New feature or request label Nov 23, 2025
Add endpoint to list all discovered components across all areas.

Changes:
- Add GET /components REST endpoint in rest_server.cpp
- Implement handle_list_components() to return component metadata
- Add test_03_list_components integration test
- Update README with API reference and endpoint documentation
- Update Postman collection with new endpoint
Copy link
Contributor

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

This PR adds a new GET /components endpoint to the REST API that returns all discovered ROS 2 components (nodes) across all areas. It complements the existing /areas endpoint by providing detailed component metadata including fully qualified names and parent area associations.

Key changes:

  • New REST endpoint implementation following existing patterns for error handling and JSON serialization
  • Comprehensive integration test with structure validation and expected component checks
  • Complete API documentation with examples and response field descriptions

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/ros2_medkit_gateway/src/rest_server.cpp Implements handle_list_components() handler that queries the entity cache and returns component metadata as JSON
src/ros2_medkit_gateway/include/ros2_medkit_gateway/rest_server.hpp Adds method declaration for the new components handler
src/ros2_medkit_gateway/test/test_integration.test.py Adds test_03_list_components() integration test and renumbers subsequent test to maintain sequential ordering
src/ros2_medkit_gateway/README.md Adds comprehensive API reference section with endpoint documentation, curl examples, and response field descriptions
postman/collections/ros2-medkit-gateway.postman_collection.json Adds "GET List Components" request to the Postman collection
postman/README.md Updates quick start guide to include the new components endpoint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mfaferek93 mfaferek93 requested a review from bburda November 23, 2025 12:30
Copy link
Collaborator

@bburda bburda left a comment

Choose a reason for hiding this comment

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

LGTM!

@bburda
Copy link
Collaborator

bburda commented Nov 23, 2025

@mfaferek93 could you asssing an issue to this PR?

@mfaferek93 mfaferek93 merged commit b179e20 into main Nov 23, 2025
7 checks passed
@mfaferek93 mfaferek93 deleted the 15/feat/GET/components branch November 26, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement GET /components endpoint to list all discovered components across all areas

3 participants