Files
recipe-api/openapi/paths/recipe-{recipeId}.yaml

118 lines
2.7 KiB
YAML

get:
tags:
- Recipe
summary: "Get a recipe"
operationId: "GetRecipe"
parameters:
- $ref: "../parameters/{recipeId}.yaml"
responses:
200:
description: OK
content:
"application/json":
schema:
$ref: "../schemas/Recipe.yaml"
examples:
recipeOut:
$ref: "../examples/HummusV1Out.yaml"
400:
description: Bad Request
content:
"application/json":
schema:
$ref: "../schemas/ProblemDetail.yaml"
404:
description: Not Found
content:
"application/json":
schema:
$ref: "../schemas/ProblemDetail.yaml"
put:
tags:
- Recipe
summary: "Update a recipe"
operationId: "UpdateRecipe"
parameters:
- $ref: "../parameters/{recipeId}.yaml"
requestBody:
content:
application/json:
schema:
$ref: "../schemas/Recipe.yaml"
examples:
recipeIn:
$ref: "../examples/HummusV2In.yaml"
required: true
responses:
200:
description: OK
content:
"application/json":
schema:
$ref: "../schemas/Recipe.yaml"
examples:
recipeOut:
$ref: "../examples/HummusV2Out.yaml"
400:
description: Bad Request
content:
"application/json":
schema:
$ref: "../schemas/ProblemDetail.yaml"
401:
description: Unauthorized
content:
"application/json":
schema:
$ref: "../schemas/ProblemDetail.yaml"
403:
description: Forbidden
content:
"application/json":
schema:
$ref: "../schemas/ProblemDetail.yaml"
404:
description: Not Found
content:
"application/json":
schema:
$ref: "../schemas/ProblemDetail.yaml"
security:
- httpBasic: [ ]
delete:
tags:
- Recipe
summary: "Remove a recipe"
operationId: "RemoveRecipe"
parameters:
- $ref: "../parameters/{recipeId}.yaml"
responses:
200:
description: OK
400:
description: Bad Request
content:
"application/json":
schema:
$ref: "../schemas/ProblemDetail.yaml"
401:
description: Unauthorized
content:
"application/json":
schema:
$ref: "../schemas/ProblemDetail.yaml"
403:
description: Forbidden
content:
"application/json":
schema:
$ref: "../schemas/ProblemDetail.yaml"
404:
description: Not Found
content:
"application/json":
schema:
$ref: "../schemas/ProblemDetail.yaml"
security:
- httpBasic: [ ]