docs: add OpenAPI documentation

This commit is contained in:
2025-08-12 17:29:02 +02:00
parent cd91ac11f9
commit aab7ff1452
25 changed files with 2422 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
type: "object"
properties:
email:
$ref: "./Email.yaml"
password:
$ref: "./Password.yaml"
required:
- email
- password

View File

@@ -0,0 +1,2 @@
type: "string"
format: date-time

View File

@@ -0,0 +1,3 @@
type: "string"
format: email
description: "Email address"

2
openapi/schemas/Id.yaml Normal file
View File

@@ -0,0 +1,2 @@
type: "integer"
format: int64

View File

@@ -0,0 +1,2 @@
type: "string"
pattern: "^(.|\\s)*\\S(.|\\s)*$"

View File

@@ -0,0 +1,4 @@
type: "string"
format: password
minLength: 8
description: "Password"

View File

@@ -0,0 +1,24 @@
type: object
properties:
type:
type: "string"
description: "URI reference that identifies the problem type."
format: "uri"
status:
type: "integer"
description: "HTTP status code generated by the origin server for this occurrence of the problem."
format: "int32"
title:
type: "string"
description: "Short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization."
detail:
type: "string"
description: "Human-readable explanation specific to this occurrence of the problem."
instance:
type: "string"
description: "URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced."
properties:
type: "object"
description: "Map for additional, non-standard properties"
required:
- title

View File

@@ -0,0 +1,39 @@
type: "object"
properties:
id:
$ref: "./Id.yaml"
readOnly: true
description: "Unique identifier of the recipe"
name:
$ref: "./NonBlankString.yaml"
description: "Name"
description:
$ref: "./NonBlankString.yaml"
description: "Description"
changedAt:
$ref: "./DateTime.yaml"
readOnly: true
description: "Last point in time when the recipe was changed"
categories:
type: "array"
items:
$ref: "./NonBlankString.yaml"
description: "Category names"
ingredients:
type: "array"
minItems: 1
items:
$ref: "./NonBlankString.yaml"
description: "Step descriptions"
steps:
type: "array"
minItems: 1
items:
$ref: "./NonBlankString.yaml"
description: "Ingredient names"
required:
- name
- description
- categories
- ingredients
- steps