PHP-Course/exam/api/docs/api.yaml
2024-07-20 19:23:43 +02:00

74 lines
1.8 KiB
YAML

openapi: 3.0.0
info:
title: PHP Course Exam
version: 1.0.0
contact:
name: Kilian Kurt Hofmann
email: khofmann@zedat.fu-berlin.de
description: PHP Course (ABV FU Berlin) 2024 Exam
paths:
/login:
summary: Login
description: Log in user
post:
summary: Login
description: Log in user
operationId: ""
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/BooleanResponse"
examples:
Success:
value: true
"401":
description: Invalid Username or Password
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
Invalid Username or Password:
value: { "message": "Invalid Username or Password" }
"404":
description: User not Found
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
User not Found:
value: { "message": "User not Found" }
tags:
- Login/Logout
externalDocs:
url: https://khofmann.userpage.fu-berlin.de/phpCourse/exam/api/docs/
security: []
servers:
- url: https://khofmann.userpage.fu-berlin.de/phpCourse/exam/api/
description: ""
variables: {}
components:
links: {}
callbacks: {}
schemas:
BooleanResponse:
type: boolean
ErrorResponse:
type: object
properties:
message:
type: string
securitySchemes:
BasicAuth:
type: apiKey
name: token
in: header
tags:
- name: Login/Logout
- name: Users
- name: Posts