From 3b3476b4582b4557065b2b3de3d6c20a33851b9f Mon Sep 17 00:00:00 2001 From: danysmall Date: Wed, 14 Jun 2023 13:31:56 +0300 Subject: [PATCH] Added apis --- api/.gitkeep | 0 api/example.yaml | 69 ++++++++++++++++++++++++++++++++++++++++++++++++ entities.yaml | 9 +++++++ 3 files changed, 78 insertions(+) delete mode 100644 api/.gitkeep create mode 100644 api/example.yaml diff --git a/api/.gitkeep b/api/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/api/example.yaml b/api/example.yaml new file mode 100644 index 0000000..b791ad5 --- /dev/null +++ b/api/example.yaml @@ -0,0 +1,69 @@ +openapi: "3.0.3" +info: + title: The Sample Service API + version: 0.0.1 + description: Send errors to Rollbar or Sentry +servers: + - url: https://sample-service.backstage-demo.roadie.io + description: A plublic instance which anyone can hit to generate sample data. +paths: + /: + get: + summary: Return Hello World + responses: + '200': + description: A JSON object with a message key and Hello World value. + content: + application/json: + schema: + type: object + example: + message: Hello world! + + /debug-sentry: + post: + summary: Send an error to Sentry + + requestBody: + description: Optional error text to send to Sentry. + required: false + content: + application/json: + schema: + type: object + example: + errorMessage: My first Sentry Error + + responses: + '200': + description: Confirmation that the error was sent. + content: + application/json: + schema: + type: object + example: + message: 'Error sent to Sentry: "My first error"' + + /debug-rollbar: + post: + summary: Send an error to Rollbar + + requestBody: + description: Optional error text to send to Rollbar. + required: false + content: + application/json: + schema: + type: object + example: + errorMessage: My first Rollbar Error + + responses: + '200': + description: Confirmation that the error was sent. + content: + application/json: + schema: + type: object + example: + message: 'Error sent to Rollbar: "My first error"' diff --git a/entities.yaml b/entities.yaml index 87aa452..541aa85 100644 --- a/entities.yaml +++ b/entities.yaml @@ -20,3 +20,12 @@ spec: owner: guests system: examples providesApis: [] +--- +apiVersion: backstage.io/v1alpha1 +kind: Location +metadata: + name: AthenaAPIs + description: A collection of Athena APIs +spec: + targets: + - ./api/exapmle.yaml \ No newline at end of file