{ "components": { "schemas": { "github_com_domicileapp_domicile_internal_db.ListRecipeIngredientsRow": { "properties": { "group_name": { "type": "string" }, "id": { "type": "integer" }, "ingredient_name": { "type": "string" }, "parse_status": { "type": "string" }, "preparation": { "type": "string" }, "quantity": { "type": "number" }, "raw_text": { "type": "string" }, "recipe_id": { "type": "integer" }, "sort_order": { "type": "number" }, "unit": { "type": "string" } }, "type": "object" }, "github_com_domicileapp_domicile_internal_db.ListRecipeInstructionsRow": { "properties": { "content": { "type": "string" }, "group_name": { "type": "string" }, "id": { "type": "integer" }, "recipe_id": { "type": "integer" }, "sort_order": { "type": "number" } }, "type": "object" }, "github_com_domicileapp_domicile_internal_db.ListRecipesRow": { "properties": { "cook_time": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "notes": { "type": "string" }, "nutrition": { "type": "string" }, "photo_url": { "type": "string" }, "prep_time": { "type": "string" }, "servings": { "type": "string" }, "short_description": { "type": "string" }, "source": { "type": "string" }, "updated_at": { "type": "string" } }, "type": "object" }, "github_com_domicileapp_domicile_internal_db.Recipe": { "properties": { "cook_time": { "type": "string" }, "created_at": { "type": "string" }, "deleted_at": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "notes": { "type": "string" }, "nutrition": { "type": "string" }, "photo_url": { "type": "string" }, "prep_time": { "type": "string" }, "servings": { "type": "string" }, "short_description": { "type": "string" }, "source": { "type": "string" }, "updated_at": { "type": "string" } }, "type": "object" }, "github_com_domicileapp_domicile_internal_db.RecipeIngredient": { "properties": { "created_at": { "type": "string" }, "group_name": { "type": "string" }, "id": { "type": "integer" }, "ingredient_name": { "type": "string" }, "parse_status": { "type": "string" }, "parsed_at": { "type": "string" }, "preparation": { "type": "string" }, "quantity": { "type": "number" }, "raw_text": { "type": "string" }, "recipe_id": { "type": "integer" }, "sort_order": { "type": "number" }, "unit": { "type": "string" }, "updated_at": { "type": "string" } }, "type": "object" }, "github_com_domicileapp_domicile_internal_db.RecipeInstruction": { "properties": { "content": { "type": "string" }, "created_at": { "type": "string" }, "group_name": { "type": "string" }, "id": { "type": "integer" }, "recipe_id": { "type": "integer" }, "sort_order": { "type": "number" }, "updated_at": { "type": "string" } }, "type": "object" }, "recipes.ErrorResponse": { "properties": { "message": { "type": "string" } }, "type": "object" }, "recipes.PaginatedResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/github_com_domicileapp_domicile_internal_db.ListRecipesRow" }, "type": "array", "uniqueItems": false }, "page": { "type": "integer" }, "size": { "type": "integer" }, "total_items": { "type": "integer" }, "total_pages": { "type": "integer" } }, "type": "object" }, "recipes.RecipeResponse": { "properties": { "cook_time": { "type": "string" }, "created_at": { "type": "string" }, "deleted_at": { "type": "string" }, "id": { "type": "integer" }, "ingredients": { "items": { "$ref": "#/components/schemas/github_com_domicileapp_domicile_internal_db.ListRecipeIngredientsRow" }, "type": "array", "uniqueItems": false }, "instructions": { "items": { "$ref": "#/components/schemas/github_com_domicileapp_domicile_internal_db.ListRecipeInstructionsRow" }, "type": "array", "uniqueItems": false }, "name": { "type": "string" }, "notes": { "type": "string" }, "nutrition": { "type": "string" }, "photo_url": { "type": "string" }, "prep_time": { "type": "string" }, "servings": { "type": "string" }, "short_description": { "type": "string" }, "source": { "type": "string" }, "updated_at": { "type": "string" } }, "type": "object" }, "recipes.createIngredientRequest": { "properties": { "group_name": { "type": "string" }, "raw_text": { "type": "string" }, "sort_order": { "type": "number" } }, "type": "object" }, "recipes.createInstructionRequest": { "properties": { "content": { "type": "string" }, "group_name": { "type": "string" }, "sort_order": { "type": "number" } }, "type": "object" }, "recipes.createRecipeRequest": { "properties": { "name": { "type": "string" }, "photo_url": { "type": "string" }, "short_description": { "type": "string" } }, "type": "object" }, "recipes.importRecipeRequest": { "properties": { "html": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "recipes.updateIngredientRequest": { "properties": { "group_name": { "type": "string" }, "raw_text": { "type": "string" }, "sort_order": { "type": "number" } }, "type": "object" }, "recipes.updateInstructionRequest": { "properties": { "content": { "type": "string" }, "sort_order": { "type": "number" } }, "type": "object" }, "recipes.updateRecipeRequest": { "properties": { "name": { "type": "string" }, "short_description": { "type": "string" } }, "type": "object" } } }, "info": { "description": "Domicile's REST API", "title": "Domicile API", "version": "0.1" }, "externalDocs": { "description": "", "url": "" }, "paths": { "/api/v1/recipes": { "get": { "description": "Get list of all recipes", "operationId": "list-recipes", "parameters": [ { "description": "Page number", "in": "query", "name": "page", "schema": { "minimum": 1, "type": "integer" } }, { "description": "Page size", "in": "query", "name": "size", "schema": { "maximum": 120, "minimum": 1, "type": "integer" } }, { "description": "Search params", "in": "query", "name": "search", "schema": { "type": "string" } }, { "description": "Sort field", "in": "query", "name": "sort", "schema": { "enum": [ "id", "name", "created_at", "updated_at" ], "type": "string" } }, { "description": "Sort direction", "in": "query", "name": "direction", "schema": { "default": "desc", "enum": [ "asc", "desc" ], "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/recipes.PaginatedResponse" } } }, "description": "OK" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/recipes.ErrorResponse" } } }, "description": "Bad Request" } }, "summary": "List recipes", "tags": [ "recipes" ] }, "post": { "operationId": "create-recipe", "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "type": "object" }, { "$ref": "#/components/schemas/recipes.createRecipeRequest", "summary": "message", "description": "Recipe data" } ] } } }, "description": "Recipe data", "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/github_com_domicileapp_domicile_internal_db.Recipe" } } }, "description": "OK" } }, "summary": "Create recipe", "tags": [ "recipes" ] } }, "/api/v1/recipes/import": { "post": { "description": "Scrape a recipe from the given HTML via the scraper and persist it.", "operationId": "import-recipe", "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "type": "object" }, { "$ref": "#/components/schemas/recipes.importRecipeRequest", "summary": "message", "description": "Page URL and HTML returned by the browser extension" } ] } } }, "description": "Page URL and HTML returned by the browser extension", "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/recipes.RecipeResponse" } } }, "description": "Created" } }, "summary": "Import a recipe from a webpage", "tags": [ "recipes" ] } }, "/api/v1/recipes/{id}": { "delete": { "operationId": "delete-recipe", "parameters": [ { "description": "Recipe ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "204": { "description": "No Content" } }, "summary": "Delete recipe", "tags": [ "recipes" ] }, "get": { "operationId": "get-recipe", "parameters": [ { "description": "Recipe ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/recipes.RecipeResponse" } } }, "description": "OK" } }, "summary": "Get recipe by ID", "tags": [ "recipes" ] }, "put": { "operationId": "update-recipe", "parameters": [ { "description": "Recipe ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "type": "object" }, { "$ref": "#/components/schemas/recipes.updateRecipeRequest", "summary": "message", "description": "Recipe data" } ] } } }, "description": "Recipe data", "required": true }, "responses": { "204": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/github_com_domicileapp_domicile_internal_db.Recipe" } } }, "description": "No Content" } }, "summary": "Update recipe", "tags": [ "recipes" ] } }, "/api/v1/recipes/{id}/ingredient": { "delete": { "parameters": [ { "description": "Recipe ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "204": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/github_com_domicileapp_domicile_internal_db.Recipe" } } }, "description": "No Content" } }, "summary": "Delete recipe ingredient", "tags": [ "recipes", "ingredients" ] }, "put": { "operationId": "update-recipe-ingredient", "parameters": [ { "description": "Recipe ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "type": "object" }, { "$ref": "#/components/schemas/recipes.updateIngredientRequest", "summary": "message", "description": "Ingredient data" } ] } } }, "description": "Ingredient data", "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/github_com_domicileapp_domicile_internal_db.Recipe" } } }, "description": "Created" } }, "summary": "Update recipe ingredient", "tags": [ "recipes", "ingredients" ] } }, "/api/v1/recipes/{id}/ingredients": { "post": { "operationId": "create-recipe-ingredient", "parameters": [ { "description": "Recipe ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "type": "object" }, { "$ref": "#/components/schemas/recipes.createIngredientRequest", "summary": "message", "description": "Ingredient data" } ] } } }, "description": "Ingredient data", "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/github_com_domicileapp_domicile_internal_db.RecipeIngredient" } } }, "description": "Created" } }, "summary": "Create recipe ingredient", "tags": [ "recipes", "ingredients" ] } }, "/api/v1/recipes/{id}/instruction": { "delete": { "operationId": "delete-recipe-instruction", "parameters": [ { "description": "Recipe ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "204": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/github_com_domicileapp_domicile_internal_db.Recipe" } } }, "description": "No Content" } }, "summary": "Delete recipe instruction", "tags": [ "recipes", "instructions" ] }, "put": { "operationId": "update-recipe-instruction", "parameters": [ { "description": "Recipe ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "type": "object" }, { "$ref": "#/components/schemas/recipes.updateInstructionRequest", "summary": "message", "description": "Instruction data" } ] } } }, "description": "Instruction data", "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/github_com_domicileapp_domicile_internal_db.Recipe" } } }, "description": "Created" } }, "summary": "Update recipe instruction", "tags": [ "recipes", "instructions" ] } }, "/api/v1/recipes/{id}/instructions": { "post": { "operationId": "create-recipe-instruction", "parameters": [ { "description": "Recipe ID", "in": "path", "name": "id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "type": "object" }, { "$ref": "#/components/schemas/recipes.createInstructionRequest", "summary": "message", "description": "Instruction data" } ] } } }, "description": "Instruction data", "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/github_com_domicileapp_domicile_internal_db.RecipeInstruction" } } }, "description": "Created" } }, "summary": "Create recipe instruction", "tags": [ "recipes", "instructions" ] } } }, "openapi": "3.1.0" }