Skip to content

fix(smithy): use greedy functionName label to allow sub-path invocation#58

Merged
grdsdev merged 1 commit into
feat/smithy-modelsfrom
fix/functions-greedy-path
Jul 21, 2026
Merged

fix(smithy): use greedy functionName label to allow sub-path invocation#58
grdsdev merged 1 commit into
feat/smithy-modelsfrom
fix/functions-greedy-path

Conversation

@mandarini

@mandarini mandarini commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Found during the JavaScript SDK codegen spike: functions.smithy types functionName as 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.smithy already uses for wildcardPath+.

Changes

  • smithy/model/functions.smithy — all five @http uris: {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 segment

Notes

  • The OpenAPI artifact was patched by hand rather than regenerated, since smithy build currently fails on a clean clone (see #51 discussion). The diff is minimal and formatting-preserving: 11 changed lines across both files.
  • Verified downstream: @hey-api/openapi-ts consumes the patched artifact and emits the path param as a raw greedy segment (same behavior as the generated Storage client's wildcardPath+).

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

@grdsdev
grdsdev marked this pull request as ready for review July 21, 2026 08:25
@grdsdev
grdsdev requested a review from a team as a code owner July 21, 2026 08:25
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ceab7f50-6842-4f97-8e04-f99299e91894

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@grdsdev
grdsdev merged commit 8020ce0 into feat/smithy-models Jul 21, 2026
1 check passed
@grdsdev
grdsdev deleted the fix/functions-greedy-path branch July 21, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants