feat(IPCEICIS-1835): 👽 Added api specification as local file
backstage wanted me the explicitly example.com to look up the api specification. Since this is just a dummy example, I generated an api spec myself and put it here
This commit is contained in:
parent
01b899e100
commit
b5454f27f1
2 changed files with 43 additions and 1 deletions
42
api-spec.yaml
Normal file
42
api-spec.yaml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
openapi: 3.0.0
|
||||||
|
info:
|
||||||
|
title: Example API
|
||||||
|
description: Eine einfache API für Demonstrationszwecke
|
||||||
|
version: 1.0.0
|
||||||
|
servers:
|
||||||
|
- url: https://api.example.com/v1
|
||||||
|
paths:
|
||||||
|
/users:
|
||||||
|
get:
|
||||||
|
summary: Liste aller Benutzer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Erfolgreiche Antwort
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/User'
|
||||||
|
post:
|
||||||
|
summary: Erstelle einen neuen Benutzer
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/User'
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Benutzer erfolgreich erstellt
|
||||||
|
components:
|
||||||
|
schemas:
|
||||||
|
User:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
email:
|
||||||
|
type: string
|
|
@ -8,4 +8,4 @@ spec:
|
||||||
lifecycle: production
|
lifecycle: production
|
||||||
owner: team-api
|
owner: team-api
|
||||||
definition:
|
definition:
|
||||||
$text: https://example.com/api-spec.yaml
|
$text: ./api-spec.yaml
|
||||||
|
|
Loading…
Reference in a new issue