Skip to content

Commit

Permalink
📝 fix open api docs (#1125)
Browse files Browse the repository at this point in the history
* 📝 fix open api docs

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
thibaultleouay and autofix-ci[bot] authored Nov 28, 2024
1 parent 7929e2a commit fd018dc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions apps/server/src/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ api.onError(handleError);

api.use("/openapi", cors());

api.openAPIRegistry.registerComponent("securitySchemes", "ApiKeyAuth", {
type: "apiKey",
in: "header",
name: "x-openstatus-key",
"x-openstatus-key": "string",
});

api.doc("/openapi", {
openapi: "3.0.0",
info: {
Expand All @@ -46,6 +53,11 @@ api.doc("/openapi", {
description:
"OpenStatus is a open-source synthetic monitoring tool that allows you to monitor your website and API's uptime, latency, and more. \n\n The OpenStatus API allows you to interact with the OpenStatus platform programmatically. \n\n To get started you need to create an account on https://www.openstatus.dev/ and create an api token in your settings.",
},
security: [
{
ApiKeyAuth: [],
},
],
});

api.get(
Expand Down

0 comments on commit fd018dc

Please sign in to comment.