Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
fix inverted transform examples

Signed-off-by: Robert Campbell <[email protected]>
  • Loading branch information
R-Campbell authored Nov 9, 2024
1 parent 10638b9 commit 9fd0933
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 }
},

0 comments on commit 9fd0933

Please sign in to comment.