From fa0e3068b4b9017eca76af0d00071a889e0f393c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Thu, 20 Jun 2024 11:08:48 +0200 Subject: [PATCH] Include method in all API endpoint children's IDs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoids duplicate IDs for object of endpoints that use the same path but a different method. Signed-off-by: Kévin Commaille --- layouts/partials/openapi/render-operation.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/openapi/render-operation.html b/layouts/partials/openapi/render-operation.html index ef525353..13e7128c 100644 --- a/layouts/partials/openapi/render-operation.html +++ b/layouts/partials/openapi/render-operation.html @@ -20,14 +20,14 @@ {{ $method := .method }} {{ $endpoint := .endpoint }} {{ $operation_data := .operation_data }} -{{ $anchor := anchorize $endpoint }} +{{ $anchor := printf "%s%s" (lower $method) (anchorize $endpoint) }}
-

+

{{ $method }} {{ $endpoint }}