Skip to content

Commit

Permalink
Changed swagger docs formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelpapineau committed Nov 9, 2023
1 parent 675abe6 commit 2f89e6d
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/fetch/openapi.ts
Original file line number Diff line number Diff line change
@@ -18,22 +18,8 @@ export default new OpenApiBuilder()
description: pkg.description,
})
.addExternalDocs({ url: pkg.homepage, description: "Extra documentation" })
.addSecurityScheme("auth-key", { type: "http", scheme: "bearer" })
//.addSecurityScheme("auth-key", { type: "http", scheme: "bearer" })

.addPath("/health", {
get: {
tags: [TAGS.MONITORING],
summary: "Performs health checks and checks if the database is accessible",
responses: {200: { description: "OK", content: { "text/plain": {example: "OK"}} } },
},
})
.addPath("/metrics", {
get: {
tags: [TAGS.MONITORING],
summary: "Prometheus metrics",
responses: {200: { description: "Prometheus metrics", content: { "text/plain": { example: await registry.metrics(), schema: { type: "string" } } }}},
},
})
.addPath("/moduleHash", {
get: {
tags: [TAGS.USAGE],
@@ -62,6 +48,20 @@ export default new OpenApiBuilder()
responses: {200: { description: "OK", content: { "text/plain": {example: "OK"}} } },
},
})
.addPath("/health", {
get: {
tags: [TAGS.MONITORING],
summary: "Performs health checks and checks if the database is accessible",
responses: {200: { description: "OK", content: { "text/plain": {example: "OK"}} } },
},
})
.addPath("/metrics", {
get: {
tags: [TAGS.MONITORING],
summary: "Prometheus metrics",
responses: {200: { description: "Prometheus metrics", content: { "text/plain": { example: await registry.metrics(), schema: { type: "string" } } }}},
},
})
.addPath("/openapi", {
get: {
tags: [TAGS.DOCS],

0 comments on commit 2f89e6d

Please sign in to comment.