From 14ec6fb3ec36f61f01107b9e53ff8d2ec1b32c78 Mon Sep 17 00:00:00 2001 From: Jefferson Rafael Kozerski Date: Fri, 22 Mar 2024 11:51:59 -0300 Subject: [PATCH] Refactor slot name in Operation component --- .../components/operation/Operation.astro | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/packages/starlight-openapi-rapidoc/components/operation/Operation.astro b/packages/starlight-openapi-rapidoc/components/operation/Operation.astro index 807d444..e03cd2a 100644 --- a/packages/starlight-openapi-rapidoc/components/operation/Operation.astro +++ b/packages/starlight-openapi-rapidoc/components/operation/Operation.astro @@ -52,6 +52,9 @@ const rapidocProps: Record = { } const { operation } = pathItemOperation +const slotName = `${pathItemOperation.method}-${ + pathItemOperation?.path?.replaceAll('{', '-')?.replaceAll('}', '-') ?? '' +}` --- -
+