From 9fd09334718d9fa4bff341d782aa207f801d1641 Mon Sep 17 00:00:00 2001 From: Robert Campbell Date: Sat, 9 Nov 2024 12:33:55 -0500 Subject: [PATCH] Update README.md fix inverted transform examples Signed-off-by: Robert Campbell --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5822dc9d..b38f5d5e 100644 --- a/README.md +++ b/README.md @@ -381,9 +381,10 @@ await fastify.register(require('@fastify/swagger'), { response, ...transformedSchema } = schema - let transformedUrl = url + let transformedUrl = URL - if (url.startsWith('/internal')) transformedSchema.hide = true + // Hide external URLs + if (url.startsWith('/external')) transformedSchema.hide = true return { schema: transformedSchema, url: transformedUrl } }, @@ -402,9 +403,10 @@ await fastify.register(require('@fastify/swagger'), { response, ...transformedSchema } = schema - let transformedUrl = url + let transformedUrl = URL - if (url.startsWith('/external')) transformedSchema.hide = true + // Hide internal URLs + if (url.startsWith('/internal')) transformedSchema.hide = true return { schema: transformedSchema, url: transformedUrl } },