munch-ease-backend/openapi.json

2870 lines
No EOL
68 KiB
JSON

{
"openapi": "3.1.0",
"info": {
"title": "Doof API",
"description": "Doof Backend API",
"version": "1.0.0"
},
"paths": {
"/api/v1/auth/register": {
"post": {
"tags": [
"auth",
"auth-v2"
],
"summary": "Register",
"operationId": "register",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RegisterBody"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokenResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/auth/login": {
"post": {
"tags": [
"auth",
"auth-v2"
],
"summary": "Login",
"operationId": "loginV2",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoginBody"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokenResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/auth/refresh": {
"post": {
"tags": [
"auth",
"auth-v2"
],
"summary": "Refresh",
"operationId": "refreshV2",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RefreshResponse"
}
}
}
},
"422": {
"$ref": "#/components/responses/Problem422"
}
}
}
},
"/api/v1/auth/logout": {
"post": {
"tags": [
"auth",
"auth-v2"
],
"summary": "Logout",
"operationId": "logoutV2",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"$ref": "#/components/responses/Problem422"
}
}
}
},
"/api/v1/users/me/households": {
"get": {
"tags": [
"households",
"households"
],
"summary": "List My Households",
"operationId": "list_my_households_api_v1_users_me_households_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/HouseholdResponse"
},
"type": "array",
"title": "Response List My Households Api V1 Users Me Households Get"
}
}
}
},
"422": {
"$ref": "#/components/responses/Problem422"
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households": {
"post": {
"tags": [
"households",
"households"
],
"summary": "Create Household",
"operationId": "create_household_api_v1_households_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateHouseholdBody"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HouseholdResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/invitations/accept": {
"post": {
"tags": [
"households",
"households"
],
"summary": "Accept Invitation",
"operationId": "accept_invitation_api_v1_invitations_accept_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"title": "Body"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/households/{householdSlug}/whoami": {
"get": {
"tags": [
"households"
],
"summary": "Whoami",
"operationId": "whoami_api_v1_households__householdSlug__whoami_get",
"parameters": [
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WhoAmI"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households/{householdSlug}/invitations": {
"post": {
"tags": [
"households"
],
"summary": "Create Invitation",
"operationId": "create_invitation_api_v1_households__householdSlug__invitations_post",
"parameters": [
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateInvitationBody"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvitationResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households/{householdSlug}/recipes": {
"get": {
"tags": [
"recipes",
"recipes-v2"
],
"summary": "List Recipes",
"operationId": "list_recipes_api_v1_households__householdSlug__recipes_get",
"parameters": [
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
},
{
"name": "q",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Q"
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Cursor"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 200,
"minimum": 1,
"default": 50,
"title": "Limit"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Page_RecipeOut_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
},
"post": {
"tags": [
"recipes",
"recipes-v2"
],
"summary": "Create Recipe",
"operationId": "create_recipe_api_v1_households__householdSlug__recipes_post",
"parameters": [
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RecipeCreate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RecipeOut"
}
}
}
},
"400": {
"$ref": "#/components/responses/Problem400"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households/{householdSlug}/recipes/{recipe_id}": {
"get": {
"tags": [
"recipes",
"recipes-v2"
],
"summary": "Get Recipe",
"operationId": "get_recipe_api_v1_households__householdSlug__recipes__recipe_id__get",
"parameters": [
{
"name": "recipe_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Recipe Id"
}
},
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RecipeOut"
}
}
}
},
"404": {
"$ref": "#/components/responses/Problem404"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
},
"delete": {
"tags": [
"recipes",
"recipes-v2"
],
"summary": "Delete Recipe",
"operationId": "delete_recipe_api_v1_households__householdSlug__recipes__recipe_id__delete",
"parameters": [
{
"name": "recipe_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Recipe Id"
}
},
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RecipeOut"
}
}
}
},
"404": {
"$ref": "#/components/responses/Problem404"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households/{householdSlug}/meals/upcoming": {
"get": {
"tags": [
"meals",
"meals-v2"
],
"summary": "List upcoming meals in a date range (scoped)",
"operationId": "getUpcomingMealsV2",
"parameters": [
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
},
{
"name": "from",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "date-time",
"title": "From"
}
},
{
"name": "to",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "date-time",
"title": "To"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MealOut"
},
"title": "Response Getupcomingmealsv2"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households/{householdSlug}/meals/{meal_id}": {
"get": {
"tags": [
"meals",
"meals-v2"
],
"summary": "Get a meal by id (scoped)",
"operationId": "getMealV2",
"parameters": [
{
"name": "meal_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Meal Id"
}
},
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MealOut"
}
}
}
},
"404": {
"$ref": "#/components/responses/Problem404"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
},
"put": {
"tags": [
"meals",
"meals-v2"
],
"summary": "Update an existing meal (scoped)",
"operationId": "updateMealV2",
"parameters": [
{
"name": "meal_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Meal Id"
}
},
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MealIn"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MealOut"
}
}
}
},
"400": {
"$ref": "#/components/responses/Problem400"
},
"404": {
"$ref": "#/components/responses/Problem404"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
},
"delete": {
"tags": [
"meals",
"meals-v2"
],
"summary": "Delete a meal (scoped)",
"operationId": "deleteMealV2",
"parameters": [
{
"name": "meal_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Meal Id"
}
},
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MealOut"
}
}
}
},
"404": {
"$ref": "#/components/responses/Problem404"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households/{householdSlug}/meals/{meal_id}/consumed": {
"post": {
"tags": [
"meals",
"meals-v2"
],
"summary": "Mark a meal as consumed (scoped)",
"operationId": "markMealConsumedV2",
"parameters": [
{
"name": "meal_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Meal Id"
}
},
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/MarkConsumedBody"
},
{
"type": "null"
}
],
"title": "Body"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MealOut"
}
}
}
},
"400": {
"$ref": "#/components/responses/Problem400"
},
"404": {
"$ref": "#/components/responses/Problem404"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households/{householdSlug}/meals": {
"post": {
"tags": [
"meals",
"meals-v2"
],
"summary": "Create a new meal (scoped)",
"operationId": "createMealV2",
"parameters": [
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MealIn"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MealOut"
}
}
}
},
"400": {
"$ref": "#/components/responses/Problem400"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households/{householdSlug}/shopping/current": {
"get": {
"tags": [
"shopping",
"shopping-v2"
],
"summary": "Get the current aggregated shopping list (scoped)",
"operationId": "getCurrentShoppingListV2",
"parameters": [
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CurrentShoppingList"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households/{householdSlug}/shopping/{list_id}": {
"get": {
"tags": [
"shopping",
"shopping-v2"
],
"summary": "Get a purchased shopping list by id (scoped)",
"operationId": "getShoppingListV2",
"parameters": [
{
"name": "list_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "List Id"
}
},
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchasedShoppingList"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households/{householdSlug}/shopping": {
"post": {
"tags": [
"shopping",
"shopping-v2"
],
"summary": "Purchase ingredients for a shopping list (scoped)",
"operationId": "purchaseIngredientsV2",
"parameters": [
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchaseListIn"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchasedShoppingList"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households/{householdSlug}/shopping/current/meals/me": {
"post": {
"tags": [
"shopping",
"shopping-v2"
],
"summary": "Request a meal for shopping (scoped)",
"operationId": "requestMealV2",
"parameters": [
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MealIdWrapper"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestedMealItem"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/households/{householdSlug}/shopping/current/meals/{meal_id}": {
"delete": {
"tags": [
"shopping",
"shopping-v2"
],
"summary": "Remove a meal request (scoped)",
"operationId": "unrequestMealV2",
"parameters": [
{
"name": "meal_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Meal Id"
}
},
{
"name": "householdSlug",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Householdslug"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Ok"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"403": {
"$ref": "#/components/responses/Problem403"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/healthz": {
"get": {
"summary": "Healthz",
"operationId": "healthz_healthz_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HealthStatus"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"CreateHouseholdBody": {
"properties": {
"name": {
"type": "string",
"title": "Name"
}
},
"type": "object",
"required": [
"name"
],
"title": "CreateHouseholdBody"
},
"CreateInvitationBody": {
"properties": {
"email": {
"type": "string",
"title": "Email"
}
},
"type": "object",
"required": [
"email"
],
"title": "CreateInvitationBody"
},
"CurrentShoppingList": {
"properties": {
"outstandingItems": {
"items": {
"$ref": "#/components/schemas/ListIngredientItem"
},
"type": "array",
"minItems": 0,
"title": "Outstandingitems"
},
"requestedMeals": {
"items": {
"$ref": "#/components/schemas/RequestedMealItem"
},
"type": "array",
"minItems": 0,
"title": "Requestedmeals"
},
"purchasedItems": {
"items": {
"$ref": "#/components/schemas/ListIngredientItem"
},
"type": "array",
"minItems": 0,
"title": "Purchaseditems"
},
"ingredientsLookup": {
"additionalProperties": {
"$ref": "#/components/schemas/Ingredient"
},
"type": "object",
"title": "Ingredientslookup"
},
"mealsLookup": {
"additionalProperties": {
"$ref": "#/components/schemas/Meal"
},
"type": "object",
"title": "Mealslookup"
},
"shoppingListLookup": {
"additionalProperties": {
"$ref": "#/components/schemas/ShoppingListOut"
},
"type": "object",
"title": "Shoppinglistlookup"
},
"recipesLookup": {
"additionalProperties": {
"$ref": "#/components/schemas/Recipe"
},
"type": "object",
"title": "Recipeslookup"
}
},
"type": "object",
"required": [
"outstandingItems",
"requestedMeals",
"purchasedItems",
"ingredientsLookup",
"mealsLookup",
"shoppingListLookup",
"recipesLookup"
],
"title": "CurrentShoppingList"
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"HealthStatus": {
"properties": {
"status": {
"type": "string",
"title": "Status",
"default": "ok"
}
},
"type": "object",
"title": "HealthStatus"
},
"HouseholdResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name"
},
"slug": {
"type": "string",
"title": "Slug"
}
},
"type": "object",
"required": [
"id",
"name",
"slug"
],
"title": "HouseholdResponse"
},
"Ingredient": {
"properties": {
"id": {
"type": "integer",
"title": "Id",
"default": -1
},
"name": {
"type": "string",
"title": "Name"
},
"line": {
"type": "string",
"title": "Line"
},
"unit": {
"type": "string",
"enum": [
"Items",
"Litre",
"Gram",
"Cup",
"Tablespoon",
"Teaspoon",
"Ounce",
"Pound",
"Fluid Ounce",
"Pint",
"Quart",
"Gallon",
"Millilitre",
"Milligram",
"Kilogram"
],
"title": "Unit",
"description": "Measurement unit (enum values are advisory; runtime accepts any string)"
},
"quantity": {
"type": "number",
"title": "Quantity"
},
"preparation": {
"type": "string",
"title": "Preparation"
},
"productId": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Productid"
},
"recipeId": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Recipeid"
},
"mealId": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Mealid"
},
"product": {
"anyOf": [
{
"$ref": "#/components/schemas/Product"
},
{
"type": "null"
}
]
}
},
"type": "object",
"required": [
"name",
"line",
"unit",
"quantity",
"preparation"
],
"title": "Ingredient"
},
"IngredientPurchaseItemIn": {
"properties": {
"ingredientId": {
"type": "integer",
"title": "Ingredientid"
},
"personId": {
"type": "integer",
"title": "Personid"
},
"createdDate": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Createddate"
},
"mealId": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Mealid"
},
"recipeId": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Recipeid"
}
},
"type": "object",
"required": [
"ingredientId",
"personId"
],
"title": "IngredientPurchaseItemIn"
},
"InvitationResponse": {
"properties": {
"token": {
"type": "string",
"title": "Token"
},
"status": {
"type": "string",
"title": "Status",
"default": "pending"
}
},
"type": "object",
"required": [
"token"
],
"title": "InvitationResponse"
},
"ListIngredientItem": {
"properties": {
"kind": {
"type": "string",
"enum": [
"ingredient"
],
"const": "ingredient",
"title": "Kind",
"default": "ingredient"
},
"id": {
"type": "integer",
"title": "Id",
"default": -1
},
"ingredientId": {
"type": "integer",
"title": "Ingredientid"
},
"personId": {
"type": "integer",
"title": "Personid"
},
"createdDate": {
"type": "string",
"format": "date-time",
"title": "Createddate"
},
"listId": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Listid"
},
"mealId": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Mealid"
},
"recipeId": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Recipeid"
}
},
"type": "object",
"required": [
"ingredientId",
"personId",
"createdDate"
],
"title": "ListIngredientItem"
},
"LoginBody": {
"properties": {
"email": {
"type": "string",
"title": "Email"
},
"password": {
"type": "string",
"title": "Password"
}
},
"type": "object",
"required": [
"email",
"password"
],
"title": "LoginBody"
},
"MarkConsumedBody": {
"properties": {
"consumedDate": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Consumeddate"
}
},
"type": "object",
"title": "MarkConsumedBody"
},
"Meal": {
"properties": {
"id": {
"type": "integer",
"title": "Id",
"default": -1
},
"suggestedDate": {
"type": "string",
"format": "date-time",
"title": "Suggesteddate"
},
"consumedDate": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Consumeddate"
},
"chefs": {
"items": {
"$ref": "#/components/schemas/Person"
},
"type": "array",
"title": "Chefs"
},
"cleanup": {
"items": {
"$ref": "#/components/schemas/Person"
},
"type": "array",
"title": "Cleanup"
},
"consumers": {
"items": {
"$ref": "#/components/schemas/Person"
},
"type": "array",
"title": "Consumers"
},
"recipes": {
"items": {
"$ref": "#/components/schemas/MealRecipe"
},
"type": "array",
"title": "Recipes"
},
"extraIngredients": {
"items": {
"$ref": "#/components/schemas/Ingredient"
},
"type": "array",
"title": "Extraingredients"
},
"purchaseDate": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Purchasedate"
}
},
"type": "object",
"required": [
"suggestedDate"
],
"title": "Meal"
},
"MealIdWrapper": {
"properties": {
"mealId": {
"type": "integer",
"title": "Mealid"
}
},
"type": "object",
"required": [
"mealId"
],
"title": "MealIdWrapper"
},
"MealIn": {
"properties": {
"id": {
"type": "integer",
"title": "Id",
"default": -1
},
"suggestedDate": {
"type": "string",
"format": "date-time",
"title": "Suggesteddate"
},
"consumedDate": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Consumeddate"
},
"chefs": {
"items": {
"$ref": "#/components/schemas/MemberRef"
},
"type": "array",
"title": "Chefs"
},
"cleanup": {
"items": {
"$ref": "#/components/schemas/MemberRef"
},
"type": "array",
"title": "Cleanup"
},
"consumers": {
"items": {
"$ref": "#/components/schemas/MemberRef"
},
"type": "array",
"title": "Consumers"
},
"recipes": {
"items": {
"$ref": "#/components/schemas/MealRecipeIn"
},
"type": "array",
"title": "Recipes",
"default": []
},
"extraIngredients": {
"items": {
"$ref": "#/components/schemas/Ingredient"
},
"type": "array",
"title": "Extraingredients",
"default": []
}
},
"type": "object",
"required": [
"suggestedDate",
"chefs",
"cleanup",
"consumers"
],
"title": "MealIn"
},
"MealOut": {
"properties": {
"id": {
"type": "integer",
"title": "Id",
"default": -1
},
"suggestedDate": {
"type": "string",
"format": "date-time",
"title": "Suggesteddate"
},
"consumedDate": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Consumeddate"
},
"chefs": {
"items": {
"$ref": "#/components/schemas/MemberRef"
},
"type": "array",
"title": "Chefs"
},
"cleanup": {
"items": {
"$ref": "#/components/schemas/MemberRef"
},
"type": "array",
"title": "Cleanup"
},
"consumers": {
"items": {
"$ref": "#/components/schemas/MemberRef"
},
"type": "array",
"title": "Consumers"
},
"recipes": {
"items": {
"$ref": "#/components/schemas/MealRecipe"
},
"type": "array",
"title": "Recipes"
},
"extraIngredients": {
"items": {
"$ref": "#/components/schemas/Ingredient"
},
"type": "array",
"title": "Extraingredients"
},
"purchaseDate": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Purchasedate"
}
},
"type": "object",
"required": [
"suggestedDate",
"chefs",
"cleanup",
"consumers",
"recipes",
"extraIngredients"
],
"title": "MealOut"
},
"MealRecipe": {
"properties": {
"mealId": {
"type": "integer",
"title": "Mealid"
},
"recipeId": {
"type": "integer",
"title": "Recipeid"
},
"servings": {
"type": "number",
"title": "Servings"
},
"recipe": {
"anyOf": [
{
"$ref": "#/components/schemas/Recipe"
},
{
"type": "null"
}
]
}
},
"type": "object",
"required": [
"mealId",
"recipeId",
"servings"
],
"title": "MealRecipe"
},
"MealRecipeIn": {
"properties": {
"mealId": {
"type": "integer",
"title": "Mealid"
},
"recipeId": {
"type": "integer",
"title": "Recipeid"
},
"servings": {
"type": "number",
"title": "Servings"
}
},
"type": "object",
"required": [
"mealId",
"recipeId",
"servings"
],
"title": "MealRecipeIn"
},
"MemberRef": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"displayName": {
"type": "string",
"title": "Displayname"
}
},
"type": "object",
"required": [
"id",
"displayName"
],
"title": "MemberRef"
},
"Ok": {
"properties": {
"ok": {
"type": "boolean",
"title": "Ok",
"default": true
}
},
"type": "object",
"title": "Ok"
},
"Page_RecipeOut_": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/RecipeOut"
},
"type": "array",
"minItems": 0,
"title": "Items"
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Nextcursor"
},
"prevCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Prevcursor"
},
"total": {
"type": "integer",
"title": "Total",
"description": "Total count",
"default": 0
}
},
"type": "object",
"required": [
"items"
],
"title": "Page[RecipeOut]"
},
"Person": {
"properties": {
"id": {
"type": "integer",
"title": "Id",
"default": -1
},
"name": {
"type": "string",
"title": "Name"
}
},
"type": "object",
"required": [
"name"
],
"title": "Person"
},
"ProblemDetails": {
"properties": {
"type": {
"type": "string",
"title": "Type",
"default": "about:blank"
},
"title": {
"type": "string",
"title": "Title"
},
"status": {
"type": "integer",
"title": "Status"
},
"detail": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Detail"
},
"instance": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Instance"
},
"errors": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"title": "Errors"
}
},
"type": "object",
"required": [
"title",
"status"
],
"title": "ProblemDetails"
},
"Product": {
"properties": {
"id": {
"type": "integer",
"title": "Id",
"default": -1
},
"productId": {
"type": "string",
"title": "Productid"
},
"shopCode": {
"type": "string",
"title": "Shopcode"
},
"link": {
"type": "string",
"title": "Link"
},
"name": {
"type": "string",
"title": "Name"
},
"quantity": {
"type": "integer",
"title": "Quantity"
},
"unit": {
"type": "string",
"title": "Unit"
},
"imgSmall": {
"type": "string",
"title": "Imgsmall"
},
"imgLarge": {
"type": "string",
"title": "Imglarge"
}
},
"type": "object",
"required": [
"productId",
"shopCode",
"link",
"name",
"quantity",
"unit",
"imgSmall",
"imgLarge"
],
"title": "Product"
},
"PurchaseListIn": {
"properties": {
"storeName": {
"$ref": "#/components/schemas/StoreNameOut"
},
"items": {
"items": {
"$ref": "#/components/schemas/IngredientPurchaseItemIn"
},
"type": "array",
"title": "Items"
}
},
"type": "object",
"required": [
"storeName",
"items"
],
"title": "PurchaseListIn"
},
"PurchasedShoppingList": {
"properties": {
"list": {
"$ref": "#/components/schemas/ShoppingListOut"
},
"mealsLookup": {
"additionalProperties": {
"$ref": "#/components/schemas/Meal"
},
"type": "object",
"title": "Mealslookup"
},
"ingredientsLookup": {
"additionalProperties": {
"$ref": "#/components/schemas/Ingredient"
},
"type": "object",
"title": "Ingredientslookup"
},
"recipesLookup": {
"additionalProperties": {
"$ref": "#/components/schemas/Recipe"
},
"type": "object",
"title": "Recipeslookup"
}
},
"type": "object",
"required": [
"list",
"mealsLookup",
"ingredientsLookup",
"recipesLookup"
],
"title": "PurchasedShoppingList"
},
"Recipe": {
"properties": {
"id": {
"type": "integer",
"title": "Id",
"default": -1
},
"name": {
"type": "string",
"title": "Name"
},
"link": {
"type": "string",
"title": "Link"
},
"serves": {
"type": "integer",
"title": "Serves"
},
"imageUrls": {
"items": {
"type": "string"
},
"type": "array",
"title": "Imageurls"
},
"ingredients": {
"items": {
"$ref": "#/components/schemas/Ingredient"
},
"type": "array",
"title": "Ingredients"
},
"basedOnRecipe": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Basedonrecipe"
},
"dateCreated": {
"type": "string",
"format": "date-time",
"title": "Datecreated"
},
"createdById": {
"type": "integer",
"title": "Createdbyid"
},
"createdBy": {
"anyOf": [
{
"$ref": "#/components/schemas/Person"
},
{
"type": "null"
}
]
},
"dateHidden": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Datehidden"
},
"hiddenById": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Hiddenbyid"
},
"hiddenBy": {
"anyOf": [
{
"$ref": "#/components/schemas/Person"
},
{
"type": "null"
}
]
}
},
"type": "object",
"required": [
"name",
"link",
"serves",
"createdById"
],
"title": "Recipe"
},
"RecipeCreate": {
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"link": {
"type": "string",
"title": "Link"
},
"serves": {
"type": "integer",
"title": "Serves"
},
"imageUrls": {
"items": {
"type": "string"
},
"type": "array",
"minItems": 0,
"title": "Imageurls"
},
"ingredients": {
"items": {
"$ref": "#/components/schemas/Ingredient"
},
"type": "array",
"minItems": 0,
"title": "Ingredients"
}
},
"type": "object",
"required": [
"name",
"link",
"serves",
"imageUrls",
"ingredients"
],
"title": "RecipeCreate"
},
"RecipeOut": {
"properties": {
"id": {
"type": "integer",
"title": "Id",
"default": -1
},
"name": {
"type": "string",
"title": "Name"
},
"link": {
"type": "string",
"title": "Link"
},
"serves": {
"type": "integer",
"title": "Serves"
},
"imageUrls": {
"items": {
"type": "string"
},
"type": "array",
"minItems": 0,
"title": "Imageurls"
},
"ingredients": {
"items": {
"$ref": "#/components/schemas/Ingredient"
},
"type": "array",
"minItems": 0,
"title": "Ingredients"
}
},
"type": "object",
"required": [
"name",
"link",
"serves",
"imageUrls",
"ingredients"
],
"title": "RecipeOut"
},
"RefreshResponse": {
"properties": {
"accessToken": {
"type": "string",
"title": "Accesstoken"
},
"tokenType": {
"type": "string",
"title": "Tokentype",
"default": "bearer"
}
},
"type": "object",
"required": [
"accessToken"
],
"title": "RefreshResponse"
},
"RegisterBody": {
"properties": {
"email": {
"type": "string",
"title": "Email"
},
"password": {
"type": "string",
"title": "Password"
},
"displayName": {
"type": "string",
"title": "Displayname"
}
},
"type": "object",
"required": [
"email",
"password",
"displayName"
],
"title": "RegisterBody"
},
"RequestedMealItem": {
"properties": {
"kind": {
"type": "string",
"enum": [
"requestedMeal"
],
"const": "requestedMeal",
"title": "Kind",
"default": "requestedMeal"
},
"id": {
"type": "integer",
"title": "Id",
"default": -1
},
"personId": {
"type": "integer",
"title": "Personid"
},
"mealId": {
"type": "integer",
"title": "Mealid"
},
"createdDate": {
"type": "string",
"format": "date-time",
"title": "Createddate"
}
},
"type": "object",
"required": [
"personId",
"mealId",
"createdDate"
],
"title": "RequestedMealItem"
},
"ShoppingListOut": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"createdDate": {
"type": "string",
"format": "date-time",
"title": "Createddate"
},
"storeName": {
"type": "string",
"enum": [
"woolworths",
"coles",
"home"
],
"title": "Storename"
},
"purchasedById": {
"type": "integer",
"title": "Purchasedbyid"
},
"purchasedBy": {
"anyOf": [
{
"$ref": "#/components/schemas/Person"
},
{
"type": "null"
}
]
},
"items": {
"items": {
"$ref": "#/components/schemas/ListIngredientItem"
},
"type": "array",
"minItems": 0,
"title": "Items"
}
},
"type": "object",
"required": [
"id",
"createdDate",
"storeName",
"purchasedById",
"items"
],
"title": "ShoppingListOut"
},
"StoreEnum": {
"type": "string",
"enum": [
"woolworths",
"coles",
""
],
"title": "StoreEnum"
},
"TokenResponse": {
"properties": {
"accessToken": {
"type": "string",
"title": "Accesstoken"
},
"tokenType": {
"type": "string",
"title": "Tokentype",
"default": "bearer"
},
"user": {
"$ref": "#/components/schemas/User"
}
},
"type": "object",
"required": [
"accessToken",
"user"
],
"title": "TokenResponse"
},
"User": {
"properties": {
"id": {
"type": "integer",
"title": "Id",
"default": -1
},
"email": {
"type": "string",
"title": "Email"
},
"displayName": {
"type": "string",
"title": "Displayname"
},
"profilePhotoUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Profilephotourl"
}
},
"type": "object",
"required": [
"email",
"displayName"
],
"title": "User"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"WhoAmI": {
"properties": {
"householdId": {
"type": "integer",
"title": "Householdid"
},
"householdSlug": {
"type": "string",
"title": "Householdslug"
}
},
"type": "object",
"required": [
"householdId",
"householdSlug"
],
"title": "WhoAmI"
},
"StoreNameOut": {
"type": "string",
"enum": [
"woolworths",
"coles",
"home"
],
"title": "StoreNameOut"
}
},
"responses": {
"Problem400": {
"description": "Bad Request",
"content": {
"application/problem+json": {},
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"Problem404": {
"description": "Not Found",
"content": {
"application/problem+json": {},
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"Problem422": {
"description": "Validation Error",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"Problem403": {
"description": "Forbidden",
"content": {
"application/problem+json": {},
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
},
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT",
"description": "JWT access token in Authorization header"
}
}
}
}