fix: forward deprecated and example param fields from Action to Route#58
fix: forward deprecated and example param fields from Action to Route#58lohanidamodar merged 1 commit intomainfrom
Conversation
…oute Platform was not passing `deprecated` and `example` fields when registering Action params as Route/Hook params, causing SDK spec generation to lose custom example values defined on route parameters.
Greptile SummaryThis PR fixes a bug where Key changes:
Minor note: The new test covers the Confidence Score: 5/5Safe to merge — the fix is minimal, correct, and consistently applied across all three init methods. All changes are additive and targeted. The bug fix forwards two previously-omitted fields with no risk of breaking existing behaviour (both fields default to safe values). The new test directly validates the fix. No P0 or P1 findings were identified. No files require special attention.
|
| Filename | Overview |
|---|---|
| src/Platform/Platform.php | Adds deprecated and example arguments to all three param() forwarding calls in initHttp(), initTasks(), and initWorker() — the fix is correct and applied consistently. |
| tests/Platform/TestActionWithParams.php | New test fixture Action that registers a /with-params route with example and deprecated named params, covering the bug scenario. |
| tests/Platform/TestService.php | Registers TestActionWithParams in the test service so the new route is available during HTTP tests. |
| tests/e2e/HTTPServicesTest.php | Adds testActionParamFieldsForwardedToRoute() which asserts all param keys (including deprecated and example) are present on the registered Route and verifies concrete values. |
Reviews (1): Last reviewed commit: "fix: forward `deprecated` and `example` ..." | Re-trigger Greptile
Summary
Platform::initHttp(),initTasks(), andinitWorker()were not forwardingdeprecatedandexamplefields when copying Action params to Route/Hook paramsexamplevalues defined on route parameters, producing minimal/default values in generated SDK docs instead of realistic examplesTest plan
composer formatpassescomposer lintpassescomposer testpasses (6 tests, 38 assertions)x-examplevalues after updating this dependency