diff --git a/api-spec.yaml b/api-spec.yaml new file mode 100644 index 0000000..df7a1c3 --- /dev/null +++ b/api-spec.yaml @@ -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 diff --git a/catalog-entity.yaml b/catalog-entity.yaml index ac5200c..ac050b9 100644 --- a/catalog-entity.yaml +++ b/catalog-entity.yaml @@ -8,4 +8,4 @@ spec: lifecycle: production owner: team-api definition: - $text: https://example.com/api-spec.yaml + $text: ./api-spec.yaml