Added apis

This commit is contained in:
Daniel Weissmall 2023-06-14 13:31:56 +03:00
parent dcffe0479e
commit 3b3476b458
3 changed files with 78 additions and 0 deletions

View File

69
api/example.yaml Normal file
View File

@ -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"'

View File

@ -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