docs: add OpenAPI documentation
This commit is contained in:
32
openapi/recipe-api.yaml
Normal file
32
openapi/recipe-api.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
openapi: "3.1.1"
|
||||
info:
|
||||
title: "Recipe API"
|
||||
description:
|
||||
"Programmatic access to a database of recipes.
|
||||
Users can publish and find recipes."
|
||||
version: "1.0.0"
|
||||
license:
|
||||
name: MIT
|
||||
url: https://opensource.org/licenses/MIT
|
||||
servers:
|
||||
- url: "https://api.recipes.bitfield.eu/v1"
|
||||
tags:
|
||||
- name: Recipe
|
||||
description: "Steps and ingredients for preparing a dish"
|
||||
- name: Account
|
||||
description: "Access to protected operations"
|
||||
security: [ ]
|
||||
paths:
|
||||
/recipe/new:
|
||||
$ref: "./paths/recipe-new.yaml"
|
||||
/recipe/search:
|
||||
$ref: "./paths/recipe-search.yaml"
|
||||
/recipe/{recipeId}:
|
||||
$ref: "./paths/recipe-{recipeId}.yaml"
|
||||
/account/register:
|
||||
$ref: "./paths/account-register.yaml"
|
||||
components:
|
||||
securitySchemes:
|
||||
httpBasic:
|
||||
type: http
|
||||
scheme: basic
|
||||
Reference in New Issue
Block a user