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

32
openapi/recipe-api.yaml Normal file
View 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