docs: add diagram and notes on sharing recipes (#1865)

This commit is contained in:
Hayden authored and GitHub committed 2022-11-27 11:29:36 -09:00
1 parent 32c4ce4536
commit 4b7a1af10b
3 files changed
+35 -3

No files matched your search

@@ -68,3 +68,32 @@ docker exec -it mealie-next bash
python /app/mealie/scripts/change_password.py
```
## How do private groups and recipes work?
Managing private groups and recipes can be confusing. The following diagram and notes should help explain how they work to determine if a recipe can be shared publicly.
- Private links that are generated using th`Share` button bypass all group and recipe permissions.
- Private groups block all access to recipes, including those that are public. Expect as noted above.
- Private recipes block all access to the recipe from public links. This does not affect Private Links.
```mermaid
stateDiagram-v2
r1: Request Access
p1: Using Private Link?
p2: Is Group Private?
p3: Is Recipe Private?
s1: Deny Access
n1: Allow Access
r1 --> p1
p1 --> p2: No
p1 --> n1: Yes
p2 --> s1: Yes
p2 --> p3: No
p3 --> s1: Yes
p3 --> n1: No
```
+1 -1
View File
@@ -14,7 +14,7 @@
<div id="redoc-container"></div>
<script src="https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js"> </script>
<script>
var spec = {"openapi": "3.0.2", "info": {"title": "Mealie", "description": "\nMealie is a web application for managing your recipes, meal plans, and shopping lists. This is the Restful\nAPI interactive documentation that can be used to explore the API. If you're justing getting started with\nthe API and want to get started quickly, you can use the [API Usage | Mealie Docs](https://hay-kot.github.io/mealie/documentation/getting-started/api-usage/)\nas a reference for how to get started.\n\n\nAs of this release <b>v1.0.0beta-5</b>, Mealie is still in rapid development and therefore some of these APIs may change from version to version.\n\n\nIf you have any questions or comments about mealie, please use the discord server to talk to the developers or other community members.\nIf you'd like to file an issue, please use the [GitHub Issue Tracker | Mealie](https://github.com/hay-kot/mealie/issues/new/choose)\n\n\n## Helpful Links\n- [Home Page](https://mealie.io)\n- [Documentation](https://hay-kot.github.io/mealie/)\n- [Discord](https://discord.gg/QuStdQGSGK)\n- [Demo](https://demo.mealie.io)\n- [Beta](https://demo.mealie.io)\n\n\n", "version": "v1.0.0beta-5"}, "paths": {"/api/app/about": {"get": {"tags": ["App: About"], "summary": "Get App Info", "description": "Get general application information", "operationId": "get_app_info_api_app_about_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppInfo"}}}}}}}, "/api/auth/token": {"post": {"tags": ["Users: Authentication"], "summary": "Get Token", "operationId": "get_token_api_auth_token_post", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"$ref": "#/components/schemas/Body_get_token_api_auth_token_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/auth/refresh": {"get": {"tags": ["Users: Authentication"], "summary": "Refresh Token", "description": "Use a valid token to get another token", "operationId": "refresh_token_api_auth_refresh_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/register": {"post": {"tags": ["Users: Registration"], "summary": "Register New User", "operationId": "register_new_user_api_users_register_post", "parameters": [{"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateUserRegistration"}}}, "required": true}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserOut"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/users/self": {"get": {"tags": ["Users: CRUD", "Users: CRUD"], "summary": "Get Logged In User", "operationId": "get_logged_in_user_api_users_self_get", "parameters": [{"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserOut"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/password": {"put": {"tags": ["Users: CRUD", "Users: CRUD"], "summary": "Update Password", "description": "Resets the User Password", "operationId": "update_password_api_users_password_put", "parameters": [{"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChangePassword"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/{item_id}": {"get": {"tags": ["Users: Admin CRUD", "Users: Admin CRUD"], "summary": "Get User", "operationId": "get_user_api_users__item_id__get", "parameters": [{"required": true, "schema": {"title": "Item Id", "type": "string", "format": "uuid4"}, "name": "item_id", "in": "path"}, {"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "responses": Line truncated
var spec = {"openapi": "3.0.2", "info": {"title": "Mealie", "description": "\nMealie is a web application for managing your recipes, meal plans, and shopping lists. This is the Restful\nAPI interactive documentation that can be used to explore the API. If you're justing getting started with\nthe API and want to get started quickly, you can use the [API Usage | Mealie Docs](https://hay-kot.github.io/mealie/documentation/getting-started/api-usage/)\nas a reference for how to get started.\n\n\nAs of this release <b>v1.0.0beta-5</b>, Mealie is still in rapid development and therefore some of these APIs may change from version to version.\n\n\nIf you have any questions or comments about mealie, please use the discord server to talk to the developers or other community members.\nIf you'd like to file an issue, please use the [GitHub Issue Tracker | Mealie](https://github.com/hay-kot/mealie/issues/new/choose)\n\n\n## Helpful Links\n- [Home Page](https://mealie.io)\n- [Documentation](https://hay-kot.github.io/mealie/)\n- [Discord](https://discord.gg/QuStdQGSGK)\n- [Demo](https://demo.mealie.io)\n- [Beta](https://demo.mealie.io)\n\n\n", "version": "v1.0.0beta-5"}, "paths": {"/api/app/about": {"get": {"tags": ["App: About"], "summary": "Get App Info", "description": "Get general application information", "operationId": "get_app_info_api_app_about_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppInfo"}}}}}}}, "/api/auth/token": {"post": {"tags": ["Users: Authentication"], "summary": "Get Token", "operationId": "get_token_api_auth_token_post", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"$ref": "#/components/schemas/Body_get_token_api_auth_token_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/auth/refresh": {"get": {"tags": ["Users: Authentication"], "summary": "Refresh Token", "description": "Use a valid token to get another token", "operationId": "refresh_token_api_auth_refresh_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/register": {"post": {"tags": ["Users: Registration"], "summary": "Register New User", "operationId": "register_new_user_api_users_register_post", "parameters": [{"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateUserRegistration"}}}, "required": true}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserOut"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/users/self": {"get": {"tags": ["Users: CRUD", "Users: CRUD"], "summary": "Get Logged In User", "operationId": "get_logged_in_user_api_users_self_get", "parameters": [{"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserOut"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/password": {"put": {"tags": ["Users: CRUD", "Users: CRUD"], "summary": "Update Password", "description": "Resets the User Password", "operationId": "update_password_api_users_password_put", "parameters": [{"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChangePassword"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"OAuth2PasswordBearer": []}]}}, "/api/users/{item_id}": {"get": {"tags": ["Users: Admin CRUD", "Users: Admin CRUD"], "summary": "Get User", "operationId": "get_user_api_users__item_id__get", "parameters": [{"required": true, "schema": {"title": "Item Id", "type": "string", "format": "uuid4"}, "name": "item_id", "in": "path"}, {"required": false, "schema": {"title": "Accept-Language", "type": "string"}, "name": "accept-language", "in": "header"}], "responses": Line truncated
Redoc.init(spec, {}, document.getElementById("redoc-container"));
</script>