Skip to content

Conversation

@akindu-k
Copy link
Collaborator

@akindu-k akindu-k commented Jan 28, 2026

Description

This pull request adds comprehensive support for HTTP GET methods to the Jac Scale REST API, allowing both walkers and functions to be invoked via GET requests with full query parameter mapping. It also improves the flexibility of the @restspec decorator, enhances endpoint registration logic, and expands test coverage for these features.

REST API Enhancements:

  • Added full support for HTTP GET requests for both walkers and functions, including correct mapping of query parameters, support for both dynamic (HMR) and static endpoints, and the ability to specify the HTTP method using @restspec(method=HTTPMethod.GET) [1]], [2]], [3]]).
  • The @restspec decorator now allows custom HTTP methods and endpoint paths for walkers and functions, supporting use cases like method=HTTPMethod.GET and path="/my/custom/path" ([docs/docs/community/release_notes/jaclang.mdL12-R16]).

Endpoint Registration and Parameter Handling:

  • Refactored endpoint registration to pass the HTTP method to parameter creation functions, enabling correct parameter type mapping (query, path, file, etc.) based on the method [1]], [2]], [3]], [4]], [5]], [6]]).
  • Dynamic endpoints for walkers and functions now support both POST and GET, with logic to extract parameters from either the request body or query string as appropriate [1]], [2]], [3]], [4]], [5]], [6]], [7]]).

Testing Improvements:

  • Added new test fixtures and test cases to verify GET and POST method support for walkers and functions, including parameter passing and custom paths [1]], [2]]).

Documentation Updates:

  • Updated release notes to document GET method support, enhanced @restspec capabilities, and usage examples [1]], [2]]).

These changes collectively make the Jac Scale REST API more flexible and standards-compliant, improving developer experience and enabling broader integration scenarios.

@Thamirawaran Thamirawaran self-requested a review January 29, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for GET method in scale walkers and functions

3 participants