From 65e67e7fe47c50fc58defc824b0f3823850a4ea5 Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Tue, 7 Jul 2026 16:46:13 +0300 Subject: [PATCH] fix(smithy): use greedy functionName label to allow sub-path invocation --- smithy/model/functions.smithy | 10 +++++----- smithy/openapi/FunctionsService.openapi.json | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/smithy/model/functions.smithy b/smithy/model/functions.smithy index bc7a056..9b66239 100644 --- a/smithy/model/functions.smithy +++ b/smithy/model/functions.smithy @@ -65,7 +65,7 @@ structure InvokeFunctionOutput { // methods Supabase Edge Functions accept; FunctionsClient.invoke() dispatches // to the appropriate generated method based on FunctionInvokeOptions.method. -@http(method: "GET", uri: "/functions/v1/{functionName}", code: 200) +@http(method: "GET", uri: "/functions/v1/{functionName+}", code: 200) @readonly operation InvokeFunctionGet { input: InvokeFunctionGetInput @@ -73,14 +73,14 @@ operation InvokeFunctionGet { errors: [FunctionsError] } -@http(method: "POST", uri: "/functions/v1/{functionName}", code: 200) +@http(method: "POST", uri: "/functions/v1/{functionName+}", code: 200) operation InvokeFunctionPost { input: InvokeFunctionInput output: InvokeFunctionOutput errors: [FunctionsError] } -@http(method: "PUT", uri: "/functions/v1/{functionName}", code: 200) +@http(method: "PUT", uri: "/functions/v1/{functionName+}", code: 200) @idempotent operation InvokeFunctionPut { input: InvokeFunctionInput @@ -88,14 +88,14 @@ operation InvokeFunctionPut { errors: [FunctionsError] } -@http(method: "PATCH", uri: "/functions/v1/{functionName}", code: 200) +@http(method: "PATCH", uri: "/functions/v1/{functionName+}", code: 200) operation InvokeFunctionPatch { input: InvokeFunctionInput output: InvokeFunctionOutput errors: [FunctionsError] } -@http(method: "DELETE", uri: "/functions/v1/{functionName}", code: 200) +@http(method: "DELETE", uri: "/functions/v1/{functionName+}", code: 200) @idempotent @suppress(["HttpMethodSemantics.UnexpectedPayload"]) operation InvokeFunctionDelete { diff --git a/smithy/openapi/FunctionsService.openapi.json b/smithy/openapi/FunctionsService.openapi.json index 6e8650b..9b115da 100644 --- a/smithy/openapi/FunctionsService.openapi.json +++ b/smithy/openapi/FunctionsService.openapi.json @@ -5,7 +5,7 @@ "version": "1.0" }, "paths": { - "/functions/v1/{functionName}": { + "/functions/v1/{functionName+}": { "delete": { "operationId": "InvokeFunctionDelete", "requestBody": { @@ -19,7 +19,7 @@ }, "parameters": [ { - "name": "functionName", + "name": "functionName+", "in": "path", "schema": { "type": "string" @@ -70,7 +70,7 @@ "operationId": "InvokeFunctionGet", "parameters": [ { - "name": "functionName", + "name": "functionName+", "in": "path", "schema": { "type": "string" @@ -130,7 +130,7 @@ }, "parameters": [ { - "name": "functionName", + "name": "functionName+", "in": "path", "schema": { "type": "string" @@ -190,7 +190,7 @@ }, "parameters": [ { - "name": "functionName", + "name": "functionName+", "in": "path", "schema": { "type": "string" @@ -250,7 +250,7 @@ }, "parameters": [ { - "name": "functionName", + "name": "functionName+", "in": "path", "schema": { "type": "string"