Openstatus www.openstatus.dev

openApi spec routes (#1244)

authored by

Abhishek and committed by
GitHub
0a32aa13 84f8b8cd

+19 -19
+1 -1
apps/server/src/routes/v1/incidents/get.ts
··· 11 11 method: "get", 12 12 tags: ["incident"], 13 13 summary: "Get an incident", 14 - path: "/:id", 14 + path: "/{id}", 15 15 request: { 16 16 params: ParamsSchema, 17 17 },
+1 -1
apps/server/src/routes/v1/incidents/put.ts
··· 14 14 tags: ["incident"], 15 15 summary: "Update an incident", 16 16 description: "Acknowledge or resolve an incident", 17 - path: "/:id", 17 + path: "/{id}", 18 18 middleware: [trackMiddleware(Events.UpdateIncident)], 19 19 request: { 20 20 params: ParamsSchema,
+1 -1
apps/server/src/routes/v1/maintenances/get.ts
··· 9 9 method: "get", 10 10 tags: ["maintenance"], 11 11 summary: "Get a maintenance", 12 - path: "/:id", 12 + path: "/{id}", 13 13 request: { 14 14 params: ParamsSchema, 15 15 },
+1 -1
apps/server/src/routes/v1/maintenances/put.ts
··· 15 15 method: "put", 16 16 tags: ["maintenance"], 17 17 summary: "Update a maintenance", 18 - path: "/:id", 18 + path: "/{id}", 19 19 middleware: [trackMiddleware(Events.UpdateMaintenance)], 20 20 request: { 21 21 params: ParamsSchema,
+1 -1
apps/server/src/routes/v1/monitors/delete.ts
··· 13 13 method: "delete", 14 14 tags: ["monitor"], 15 15 summary: "Delete a monitor", 16 - path: "/:id", 16 + path: "/{id}", 17 17 request: { 18 18 params: ParamsSchema, 19 19 },
+1 -1
apps/server/src/routes/v1/monitors/get.ts
··· 11 11 method: "get", 12 12 tags: ["monitor"], 13 13 summary: "Get a monitor", 14 - path: "/:id", 14 + path: "/{id}", 15 15 request: { 16 16 params: ParamsSchema, 17 17 },
+1 -1
apps/server/src/routes/v1/monitors/put.ts
··· 15 15 method: "put", 16 16 tags: ["monitor"], 17 17 summary: "Update a monitor", 18 - path: "/:id", 18 + path: "/{id}", 19 19 middleware: [trackMiddleware(Events.UpdateMonitor)], 20 20 request: { 21 21 params: ParamsSchema,
+1 -1
apps/server/src/routes/v1/monitors/results/get.ts
··· 18 18 // FIXME: Should work for all types of monitors 19 19 description: 20 20 "**WARNING:** This works only for HTTP monitors. We will add support for other types of monitors soon.", 21 - path: "/:id/result/:resultId", 21 + path: "/{id}/result/{resultId}", 22 22 request: { 23 23 params: ParamsSchema.extend({ 24 24 resultId: z.string().openapi({
+1 -1
apps/server/src/routes/v1/monitors/run/post.ts
··· 20 20 summary: "Create a monitor run", 21 21 description: 22 22 "Run a synthetic check for a specific monitor. It will take all configs into account.", 23 - path: "/:id/run", 23 + path: "/{id}/run", 24 24 request: { 25 25 params: ParamsSchema, 26 26 query: QuerySchema,
+1 -1
apps/server/src/routes/v1/monitors/summary/get.ts
··· 24 24 summary: "Get a monitor summary", 25 25 description: 26 26 "Get a monitor summary of the last 45 days of data to be used within a status page", 27 - path: "/:id/summary", 27 + path: "/{id}/summary", 28 28 request: { 29 29 params: ParamsSchema, 30 30 },
+1 -1
apps/server/src/routes/v1/monitors/trigger/post.ts
··· 18 18 tags: ["monitor"], 19 19 summary: "Create a monitor trigger", 20 20 description: "Trigger a monitor check without waiting the result", 21 - path: "/:id/trigger", 21 + path: "/{id}/trigger", 22 22 request: { 23 23 params: ParamsSchema, 24 24 },
+1 -1
apps/server/src/routes/v1/notifications/get.ts
··· 13 13 method: "get", 14 14 tags: ["notification"], 15 15 summary: "Get a notification", 16 - path: "/:id", 16 + path: "/{id}", 17 17 request: { 18 18 params: ParamsSchema, 19 19 },
+1 -1
apps/server/src/routes/v1/pageSubscribers/post.ts
··· 14 14 method: "post", 15 15 tags: ["page_subscriber"], 16 16 summary: "Subscribe to a status page", 17 - path: "/:id/update", 17 + path: "/{id}/update", 18 18 middleware: [trackMiddleware(Events.SubscribePage)], 19 19 description: "Add a subscriber to a status page", // TODO: how to define legacy routes 20 20 request: {
+1 -1
apps/server/src/routes/v1/pages/get.ts
··· 11 11 method: "get", 12 12 tags: ["page"], 13 13 summary: "Get a status page", 14 - path: "/:id", 14 + path: "/{id}", 15 15 request: { 16 16 params: ParamsSchema, 17 17 },
+1 -1
apps/server/src/routes/v1/pages/put.ts
··· 19 19 method: "put", 20 20 tags: ["page"], 21 21 summary: "Update a status page", 22 - path: "/:id", 22 + path: "/{id}", 23 23 middleware: [trackMiddleware(Events.UpdatePage)], 24 24 request: { 25 25 params: ParamsSchema,
+1 -1
apps/server/src/routes/v1/statusReportUpdates/get.ts
··· 11 11 method: "get", 12 12 tags: ["status_report_update"], 13 13 summary: "Get a status report update", 14 - path: "/:id", 14 + path: "/{id}", 15 15 request: { 16 16 params: ParamsSchema, 17 17 },
+1 -1
apps/server/src/routes/v1/statusReports/delete.ts
··· 11 11 method: "delete", 12 12 tags: ["status_report"], 13 13 summary: "Delete a status report", 14 - path: "/:id", 14 + path: "/{id}", 15 15 request: { 16 16 params: ParamsSchema, 17 17 },
+1 -1
apps/server/src/routes/v1/statusReports/get.ts
··· 11 11 method: "get", 12 12 tags: ["status_report"], 13 13 summary: "Get a status report", 14 - path: "/:id", 14 + path: "/{id}", 15 15 request: { 16 16 params: ParamsSchema, 17 17 },
+1 -1
apps/server/src/routes/v1/statusReports/update/post.ts
··· 20 20 const postRouteUpdate = createRoute({ 21 21 method: "post", 22 22 tags: ["status_report"], 23 - path: "/:id/update", 23 + path: "/{id}/update", 24 24 summary: "Create a status report update", 25 25 deprecated: true, 26 26 description: