fix(smithy): use greedy functionName label to allow sub-path invocation#58
Merged
Merged
Conversation
grdsdev
marked this pull request as ready for review
July 21, 2026 08:25
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
grdsdev
approved these changes
Jul 21, 2026
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.
Summary
Found during the JavaScript SDK codegen spike:
functions.smithytypesfunctionNameas a plain@httpLabel, so generated clients percent-encode slashes in the function name —invoke('my-fn/some/route')becomes/functions/v1/my-fn%2Fsome%2Froute. Sub-path invocation is a real Edge Functions use case, and the hand-written SDK clients support it today by appending the name unencoded.This switches the path segment to a greedy label, the same convention
storage.smithyalready uses forwildcardPath+.Changes
smithy/model/functions.smithy— all five@httpuris:{functionName}→{functionName+}smithy/openapi/FunctionsService.openapi.json— path key and the five path parameters renamed to match (functionName+), mirroring how the committed Storage artifact represents its greedy segmentNotes
smithy buildcurrently fails on a clean clone (see #51 discussion). The diff is minimal and formatting-preserving: 11 changed lines across both files.@hey-api/openapi-tsconsumes the patched artifact and emits the path param as a raw greedy segment (same behavior as the generated Storage client'swildcardPath+).Targets
feat/smithy-models(#51), per its "living draft" process — one of the model gaps the JS spike was asked to feed back.🤖 Generated with Claude Code