docs: add OpenAPI documentation
This commit is contained in:
9
openapi/schemas/Account.yaml
Normal file
9
openapi/schemas/Account.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
type: "object"
|
||||
properties:
|
||||
email:
|
||||
$ref: "./Email.yaml"
|
||||
password:
|
||||
$ref: "./Password.yaml"
|
||||
required:
|
||||
- email
|
||||
- password
|
||||
2
openapi/schemas/DateTime.yaml
Normal file
2
openapi/schemas/DateTime.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
type: "string"
|
||||
format: date-time
|
||||
3
openapi/schemas/Email.yaml
Normal file
3
openapi/schemas/Email.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
type: "string"
|
||||
format: email
|
||||
description: "Email address"
|
||||
2
openapi/schemas/Id.yaml
Normal file
2
openapi/schemas/Id.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
type: "integer"
|
||||
format: int64
|
||||
2
openapi/schemas/NonBlankString.yaml
Normal file
2
openapi/schemas/NonBlankString.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
type: "string"
|
||||
pattern: "^(.|\\s)*\\S(.|\\s)*$"
|
||||
4
openapi/schemas/Password.yaml
Normal file
4
openapi/schemas/Password.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
type: "string"
|
||||
format: password
|
||||
minLength: 8
|
||||
description: "Password"
|
||||
24
openapi/schemas/ProblemDetail.yaml
Normal file
24
openapi/schemas/ProblemDetail.yaml
Normal 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
|
||||
39
openapi/schemas/Recipe.yaml
Normal file
39
openapi/schemas/Recipe.yaml
Normal 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
|
||||
Reference in New Issue
Block a user