43 lines
955 B
YAML
43 lines
955 B
YAML
![]() |
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
|