diff --git a/docs/Tandoor (2.3.6).yaml b/docs/Tandoor (2.3.6).yaml new file mode 100644 index 0000000..be097b3 --- /dev/null +++ b/docs/Tandoor (2.3.6).yaml @@ -0,0 +1,15468 @@ +openapi: 3.0.3 +info: + title: Tandoor + version: 0.0.0 (2.3.6) + x-logo: + url: /static/assets/brand_logo.svg + backgroundColor: '#FFFFFF' + altText: Tandoor logo + href: / + description: Tandoor API Docs +paths: + /api-token-auth/: + post: + operationId: apiTokenAuthCreate + tags: + - api-token-auth + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AuthToken' + multipart/form-data: + schema: + $ref: '#/components/schemas/AuthToken' + application/json: + schema: + $ref: '#/components/schemas/AuthToken' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuthToken' + description: '' + /api/access-token/: + get: + operationId: apiAccessTokenList + description: logs request counts to redis cache total/per user/ + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AccessToken' + description: '' + post: + operationId: apiAccessTokenCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AccessToken' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AccessToken' + multipart/form-data: + schema: + $ref: '#/components/schemas/AccessToken' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AccessToken' + description: '' + /api/access-token/{id}/: + get: + operationId: apiAccessTokenRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this access token. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccessToken' + description: '' + put: + operationId: apiAccessTokenUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this access token. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AccessToken' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AccessToken' + multipart/form-data: + schema: + $ref: '#/components/schemas/AccessToken' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccessToken' + description: '' + patch: + operationId: apiAccessTokenPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this access token. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAccessToken' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedAccessToken' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedAccessToken' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccessToken' + description: '' + delete: + operationId: apiAccessTokenDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this access token. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/ai-import/: + post: + operationId: apiAiImportCreate + description: given an image or PDF file convert its content to a structured + recipe using AI and the scraping system + tags: + - api + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/AiImport' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeFromSourceResponse' + description: '' + /api/ai-log/: + get: + operationId: apiAiLogList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAiLogList' + description: '' + /api/ai-log/{id}/: + get: + operationId: apiAiLogRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this ai log. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AiLog' + description: '' + /api/ai-provider/: + get: + operationId: apiAiProviderList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAiProviderList' + description: '' + post: + operationId: apiAiProviderCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AiProvider' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AiProvider' + multipart/form-data: + schema: + $ref: '#/components/schemas/AiProvider' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AiProvider' + description: '' + /api/ai-provider/{id}/: + get: + operationId: apiAiProviderRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this ai provider. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AiProvider' + description: '' + put: + operationId: apiAiProviderUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this ai provider. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AiProvider' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AiProvider' + multipart/form-data: + schema: + $ref: '#/components/schemas/AiProvider' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AiProvider' + description: '' + patch: + operationId: apiAiProviderPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this ai provider. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAiProvider' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedAiProvider' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedAiProvider' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AiProvider' + description: '' + delete: + operationId: apiAiProviderDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this ai provider. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/ai-provider/{id}/cascading/: + get: + operationId: apiAiProviderCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this ai provider. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/ai-provider/{id}/nulling/: + get: + operationId: apiAiProviderNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this ai provider. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/ai-provider/{id}/protecting/: + get: + operationId: apiAiProviderProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this ai provider. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/ai-step-sort/: + post: + operationId: apiAiStepSortCreate + description: given an image or PDF file convert its content to a structured + recipe using AI and the scraping system + parameters: + - in: query + name: provider + schema: + type: integer + description: ID of the AI provider that should be used for this AI request + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Recipe' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Recipe' + multipart/form-data: + schema: + $ref: '#/components/schemas/Recipe' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Recipe' + description: '' + /api/auto-plan/: + post: + operationId: apiAutoPlanCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AutoMealPlan' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AutoMealPlan' + multipart/form-data: + schema: + $ref: '#/components/schemas/AutoMealPlan' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AutoMealPlan' + description: '' + /api/automation/: + get: + operationId: apiAutomationList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: type + schema: + type: array + items: + type: string + enum: + - DESCRIPTION_REPLACE + - FOOD_ALIAS + - FOOD_REPLACE + - INSTRUCTION_REPLACE + - KEYWORD_ALIAS + - NAME_REPLACE + - NEVER_UNIT + - TRANSPOSE_WORDS + - UNIT_ALIAS + - UNIT_REPLACE + description: Return the Automations matching the automation type. Repeat + for multiple. + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAutomationList' + description: '' + post: + operationId: apiAutomationCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Automation' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Automation' + multipart/form-data: + schema: + $ref: '#/components/schemas/Automation' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Automation' + description: '' + /api/automation/{id}/: + get: + operationId: apiAutomationRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this automation. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Automation' + description: '' + put: + operationId: apiAutomationUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this automation. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Automation' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Automation' + multipart/form-data: + schema: + $ref: '#/components/schemas/Automation' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Automation' + description: '' + patch: + operationId: apiAutomationPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this automation. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAutomation' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedAutomation' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedAutomation' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Automation' + description: '' + delete: + operationId: apiAutomationDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this automation. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/bookmarklet-import/: + get: + operationId: apiBookmarkletImportList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBookmarkletImportListList' + description: '' + post: + operationId: apiBookmarkletImportCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BookmarkletImport' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/BookmarkletImport' + multipart/form-data: + schema: + $ref: '#/components/schemas/BookmarkletImport' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/BookmarkletImport' + description: '' + /api/bookmarklet-import/{id}/: + get: + operationId: apiBookmarkletImportRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this bookmarklet import. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BookmarkletImport' + description: '' + put: + operationId: apiBookmarkletImportUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this bookmarklet import. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BookmarkletImport' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/BookmarkletImport' + multipart/form-data: + schema: + $ref: '#/components/schemas/BookmarkletImport' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BookmarkletImport' + description: '' + patch: + operationId: apiBookmarkletImportPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this bookmarklet import. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedBookmarkletImport' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedBookmarkletImport' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedBookmarkletImport' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BookmarkletImport' + description: '' + delete: + operationId: apiBookmarkletImportDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this bookmarklet import. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/connector-config/: + get: + operationId: apiConnectorConfigList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedConnectorConfigList' + description: '' + post: + operationId: apiConnectorConfigCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectorConfig' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ConnectorConfig' + multipart/form-data: + schema: + $ref: '#/components/schemas/ConnectorConfig' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectorConfig' + description: '' + /api/connector-config/{id}/: + get: + operationId: apiConnectorConfigRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this connector config. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectorConfig' + description: '' + put: + operationId: apiConnectorConfigUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this connector config. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectorConfig' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ConnectorConfig' + multipart/form-data: + schema: + $ref: '#/components/schemas/ConnectorConfig' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectorConfig' + description: '' + patch: + operationId: apiConnectorConfigPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this connector config. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedConnectorConfig' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedConnectorConfig' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedConnectorConfig' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectorConfig' + description: '' + delete: + operationId: apiConnectorConfigDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this connector config. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/connector-config/{id}/cascading/: + get: + operationId: apiConnectorConfigCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this connector config. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/connector-config/{id}/nulling/: + get: + operationId: apiConnectorConfigNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this connector config. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/connector-config/{id}/protecting/: + get: + operationId: apiConnectorConfigProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this connector config. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/cook-log/: + get: + operationId: apiCookLogList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: recipe + schema: + type: integer + description: Filter for entries with the given recipe + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCookLogList' + description: '' + post: + operationId: apiCookLogCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CookLog' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CookLog' + multipart/form-data: + schema: + $ref: '#/components/schemas/CookLog' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CookLog' + description: '' + /api/cook-log/{id}/: + get: + operationId: apiCookLogRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this cook log. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CookLog' + description: '' + put: + operationId: apiCookLogUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this cook log. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CookLog' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CookLog' + multipart/form-data: + schema: + $ref: '#/components/schemas/CookLog' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CookLog' + description: '' + patch: + operationId: apiCookLogPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this cook log. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedCookLog' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedCookLog' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedCookLog' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CookLog' + description: '' + delete: + operationId: apiCookLogDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this cook log. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/custom-filter/: + get: + operationId: apiCustomFilterList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: limit + schema: + type: string + description: limit number of entries to return + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: lookup if query string is contained within the name, case insensitive + - in: query + name: random + schema: + type: string + description: randomly orders entries (only works together with limit) + - in: query + name: type + schema: + type: array + items: + type: string + enum: + - FOOD + - KEYWORD + - RECIPE + description: Return the CustomFilters matching the model type. Repeat for + multiple. + - in: query + name: updated_at + schema: + type: string + description: if model has an updated_at timestamp, filter only models updated + at or after datetime + examples: + DateFormat: + value: '1972-12-05' + summary: Date Format + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCustomFilterList' + description: '' + post: + operationId: apiCustomFilterCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomFilter' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomFilter' + multipart/form-data: + schema: + $ref: '#/components/schemas/CustomFilter' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CustomFilter' + description: '' + /api/custom-filter/{id}/: + get: + operationId: apiCustomFilterRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this custom filter. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CustomFilter' + description: '' + put: + operationId: apiCustomFilterUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this custom filter. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomFilter' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomFilter' + multipart/form-data: + schema: + $ref: '#/components/schemas/CustomFilter' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CustomFilter' + description: '' + patch: + operationId: apiCustomFilterPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this custom filter. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedCustomFilter' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedCustomFilter' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedCustomFilter' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CustomFilter' + description: '' + delete: + operationId: apiCustomFilterDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this custom filter. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/download-file/{fileId}/: + get: + operationId: apiDownloadFileRetrieve + description: |- + function to download a user file securely (wrapping as zip to prevent any context based XSS problems) + temporary solution until a real file manager is implemented + parameters: + - in: path + name: fileId + schema: + type: integer + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + description: No response body + /api/export/: + post: + operationId: apiExportCreate + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExportRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ExportRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ExportRequest' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExportLog' + description: '' + /api/export-log/: + get: + operationId: apiExportLogList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedExportLogList' + description: '' + post: + operationId: apiExportLogCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExportLog' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ExportLog' + multipart/form-data: + schema: + $ref: '#/components/schemas/ExportLog' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ExportLog' + description: '' + /api/export-log/{id}/: + get: + operationId: apiExportLogRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this export log. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExportLog' + description: '' + put: + operationId: apiExportLogUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this export log. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExportLog' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ExportLog' + multipart/form-data: + schema: + $ref: '#/components/schemas/ExportLog' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExportLog' + description: '' + patch: + operationId: apiExportLogPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this export log. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedExportLog' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedExportLog' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedExportLog' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExportLog' + description: '' + delete: + operationId: apiExportLogDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this export log. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/fdc-search/: + get: + operationId: apiFdcSearchRetrieve + parameters: + - in: query + name: dataType + schema: + type: array + items: + type: string + description: 'options: Branded,Foundation,Survey (FNDDS),SR Legacy' + - in: query + name: query + schema: + type: string + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FdcQuery' + description: '' + /api/food/: + get: + operationId: apiFoodList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: limit + schema: + type: string + description: limit number of entries to return + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: lookup if query string is contained within the name, case insensitive + - in: query + name: random + schema: + type: string + description: randomly orders entries (only works together with limit) + - in: query + name: root + schema: + type: integer + description: Return first level children of {obj} with ID [int]. Integer + 0 will return root {obj}s. + - in: query + name: root_tree + schema: + type: integer + description: Return all items belonging to the tree of the given {obj} id + - in: query + name: tree + schema: + type: integer + description: Return all self and children of {obj} with ID [int]. + - in: query + name: updated_at + schema: + type: string + description: if model has an updated_at timestamp, filter only models updated + at or after datetime + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedFoodList' + description: '' + post: + operationId: apiFoodCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Food' + multipart/form-data: + schema: + $ref: '#/components/schemas/Food' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + description: '' + /api/food-inherit-field/: + get: + operationId: apiFoodInheritFieldList + description: logs request counts to redis cache total/per user/ + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/FoodInheritField' + description: '' + /api/food-inherit-field/{id}/: + get: + operationId: apiFoodInheritFieldRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food inherit field. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FoodInheritField' + description: '' + /api/food/{id}/: + get: + operationId: apiFoodRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + description: '' + put: + operationId: apiFoodUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Food' + multipart/form-data: + schema: + $ref: '#/components/schemas/Food' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + description: '' + patch: + operationId: apiFoodPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedFood' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedFood' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedFood' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + description: '' + delete: + operationId: apiFoodDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/food/{id}/aiproperties/: + post: + operationId: apiFoodAipropertiesCreate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food. + required: true + - in: query + name: provider + schema: + type: integer + description: ID of the AI provider that should be used for this AI request + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Food' + multipart/form-data: + schema: + $ref: '#/components/schemas/Food' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + description: '' + /api/food/{id}/cascading/: + get: + operationId: apiFoodCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/food/{id}/fdc/: + post: + operationId: apiFoodFdcCreate + description: |- + updates the food with all possible data from the FDC Api + if properties with a fdc_id already exist they will be overridden, if existing properties don't have a fdc_id they won't be changed + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Food' + multipart/form-data: + schema: + $ref: '#/components/schemas/Food' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + description: '' + /api/food/{id}/merge/{target}/: + put: + operationId: apiFoodMergeUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food. + required: true + - in: path + name: target + schema: + type: integer + description: The ID of the {obj} you want to merge with. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Food' + multipart/form-data: + schema: + $ref: '#/components/schemas/Food' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + description: '' + /api/food/{id}/move/{parent}/: + put: + operationId: apiFoodMoveUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food. + required: true + - in: path + name: parent + schema: + type: integer + description: The ID of the desired parent of the {obj}. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Food' + multipart/form-data: + schema: + $ref: '#/components/schemas/Food' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Food' + description: '' + /api/food/{id}/nulling/: + get: + operationId: apiFoodNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/food/{id}/protecting/: + get: + operationId: apiFoodProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/food/{id}/shopping/: + put: + operationId: apiFoodShoppingUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this food. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FoodShoppingUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/FoodShoppingUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/FoodShoppingUpdate' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FoodShoppingUpdate' + description: '' + /api/food/batch_update/: + put: + operationId: apiFoodBatchUpdateUpdate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FoodBatchUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/FoodBatchUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/FoodBatchUpdate' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FoodBatchUpdate' + description: '' + /api/get_external_file_link/{id}/: + get: + operationId: apiGetExternalFileLinkRetrieve + parameters: + - in: path + name: id + schema: + type: integer + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + description: No response body + /api/get_recipe_file/{id}/: + get: + operationId: apiGetRecipeFileRetrieve + parameters: + - in: path + name: id + schema: + type: integer + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + description: No response body + /api/group/: + get: + operationId: apiGroupList + description: logs request counts to redis cache total/per user/ + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Group' + description: '' + /api/group/{id}/: + get: + operationId: apiGroupRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this gruppo. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + description: '' + /api/import/: + post: + operationId: apiImportCreate + tags: + - api + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/AiImport' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeFromSourceResponse' + description: '' + /api/import-log/: + get: + operationId: apiImportLogList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedImportLogList' + description: '' + post: + operationId: apiImportLogCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportLog' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ImportLog' + multipart/form-data: + schema: + $ref: '#/components/schemas/ImportLog' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ImportLog' + description: '' + /api/import-log/{id}/: + get: + operationId: apiImportLogRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this import log. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ImportLog' + description: '' + put: + operationId: apiImportLogUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this import log. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportLog' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ImportLog' + multipart/form-data: + schema: + $ref: '#/components/schemas/ImportLog' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ImportLog' + description: '' + patch: + operationId: apiImportLogPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this import log. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedImportLog' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedImportLog' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedImportLog' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ImportLog' + description: '' + delete: + operationId: apiImportLogDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this import log. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/import-open-data/: + get: + operationId: apiImportOpenDataRetrieve + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ImportOpenDataMetaData' + description: '' + post: + operationId: apiImportOpenDataCreate + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportOpenData' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ImportOpenData' + multipart/form-data: + schema: + $ref: '#/components/schemas/ImportOpenData' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ImportOpenDataResponse' + description: '' + /api/ingredient/: + get: + operationId: apiIngredientList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: food + schema: + type: integer + description: ID of food to filter for + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: unit + schema: + type: integer + description: ID of unit to filter for + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedIngredientList' + description: '' + post: + operationId: apiIngredientCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Ingredient' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Ingredient' + multipart/form-data: + schema: + $ref: '#/components/schemas/Ingredient' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Ingredient' + description: '' + /api/ingredient-from-string/: + post: + operationId: apiIngredientFromStringCreate + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IngredientString' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/IngredientString' + multipart/form-data: + schema: + $ref: '#/components/schemas/IngredientString' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ParsedIngredient' + description: '' + /api/ingredient/{id}/: + get: + operationId: apiIngredientRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this ingredient. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Ingredient' + description: '' + put: + operationId: apiIngredientUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this ingredient. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Ingredient' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Ingredient' + multipart/form-data: + schema: + $ref: '#/components/schemas/Ingredient' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Ingredient' + description: '' + patch: + operationId: apiIngredientPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this ingredient. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedIngredient' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedIngredient' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedIngredient' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Ingredient' + description: '' + delete: + operationId: apiIngredientDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this ingredient. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/invite-link/: + get: + operationId: apiInviteLinkList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: internal_note + schema: + type: string + description: Text field to store data that gets carried over to the UserSpace + created from the InviteLink + - in: query + name: limit + schema: + type: string + description: limit number of entries to return + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: lookup if query string is contained within the name, case insensitive + - in: query + name: random + schema: + type: string + description: randomly orders entries (only works together with limit) + - in: query + name: unused + schema: + type: boolean + description: Only return InviteLinks that have not been used yet. + - in: query + name: updated_at + schema: + type: string + description: if model has an updated_at timestamp, filter only models updated + at or after datetime + examples: + DateFormat: + value: '1972-12-05' + summary: Date Format + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedInviteLinkList' + description: '' + post: + operationId: apiInviteLinkCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InviteLink' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/InviteLink' + multipart/form-data: + schema: + $ref: '#/components/schemas/InviteLink' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/InviteLink' + description: '' + /api/invite-link/{id}/: + get: + operationId: apiInviteLinkRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this invite link. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/InviteLink' + description: '' + put: + operationId: apiInviteLinkUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this invite link. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InviteLink' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/InviteLink' + multipart/form-data: + schema: + $ref: '#/components/schemas/InviteLink' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/InviteLink' + description: '' + patch: + operationId: apiInviteLinkPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this invite link. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedInviteLink' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedInviteLink' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedInviteLink' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/InviteLink' + description: '' + delete: + operationId: apiInviteLinkDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this invite link. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/keyword/: + get: + operationId: apiKeywordList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: limit + schema: + type: string + description: limit number of entries to return + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: lookup if query string is contained within the name, case insensitive + - in: query + name: random + schema: + type: string + description: randomly orders entries (only works together with limit) + - in: query + name: root + schema: + type: integer + description: Return first level children of {obj} with ID [int]. Integer + 0 will return root {obj}s. + - in: query + name: root_tree + schema: + type: integer + description: Return all items belonging to the tree of the given {obj} id + - in: query + name: tree + schema: + type: integer + description: Return all self and children of {obj} with ID [int]. + - in: query + name: updated_at + schema: + type: string + description: if model has an updated_at timestamp, filter only models updated + at or after datetime + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedKeywordList' + description: '' + post: + operationId: apiKeywordCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Keyword' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Keyword' + multipart/form-data: + schema: + $ref: '#/components/schemas/Keyword' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Keyword' + description: '' + /api/keyword/{id}/: + get: + operationId: apiKeywordRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this keyword. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Keyword' + description: '' + put: + operationId: apiKeywordUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this keyword. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Keyword' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Keyword' + multipart/form-data: + schema: + $ref: '#/components/schemas/Keyword' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Keyword' + description: '' + patch: + operationId: apiKeywordPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this keyword. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedKeyword' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedKeyword' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedKeyword' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Keyword' + description: '' + delete: + operationId: apiKeywordDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this keyword. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/keyword/{id}/cascading/: + get: + operationId: apiKeywordCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this keyword. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/keyword/{id}/merge/{target}/: + put: + operationId: apiKeywordMergeUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this keyword. + required: true + - in: path + name: target + schema: + type: integer + description: The ID of the {obj} you want to merge with. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Keyword' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Keyword' + multipart/form-data: + schema: + $ref: '#/components/schemas/Keyword' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Keyword' + description: '' + /api/keyword/{id}/move/{parent}/: + put: + operationId: apiKeywordMoveUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this keyword. + required: true + - in: path + name: parent + schema: + type: integer + description: The ID of the desired parent of the {obj}. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Keyword' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Keyword' + multipart/form-data: + schema: + $ref: '#/components/schemas/Keyword' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Keyword' + description: '' + /api/keyword/{id}/nulling/: + get: + operationId: apiKeywordNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this keyword. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/keyword/{id}/protecting/: + get: + operationId: apiKeywordProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this keyword. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/localization/: + get: + operationId: apiLocalizationList + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Localization' + description: '' + /api/meal-plan/: + get: + operationId: apiMealPlanList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: from_date + schema: + type: string + description: Filter meal plans from date (inclusive). + examples: + DateFormat: + value: '1972-12-05' + summary: Date Format + - in: query + name: meal_type + schema: + type: array + items: + type: string + description: Filter meal plans with MealType ID. For multiple repeat parameter. + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: to_date + schema: + type: string + description: Filter meal plans to date (inclusive). + examples: + DateFormat: + value: '1972-12-05' + summary: Date Format + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedMealPlanList' + description: '' + post: + operationId: apiMealPlanCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MealPlan' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/MealPlan' + multipart/form-data: + schema: + $ref: '#/components/schemas/MealPlan' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/MealPlan' + description: '' + /api/meal-plan/{id}/: + get: + operationId: apiMealPlanRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this meal plan. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MealPlan' + description: '' + put: + operationId: apiMealPlanUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this meal plan. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MealPlan' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/MealPlan' + multipart/form-data: + schema: + $ref: '#/components/schemas/MealPlan' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MealPlan' + description: '' + patch: + operationId: apiMealPlanPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this meal plan. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedMealPlan' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedMealPlan' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedMealPlan' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MealPlan' + description: '' + delete: + operationId: apiMealPlanDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this meal plan. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/meal-plan/ical/: + get: + operationId: apiMealPlanIcalRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: from_date + schema: + type: string + description: Filter meal plans from date (inclusive). + examples: + DateFormat: + value: '1972-12-05' + summary: Date Format + - in: query + name: meal_type + schema: + type: array + items: + type: string + description: Filter meal plans with MealType ID. For multiple repeat parameter. + - in: query + name: to_date + schema: + type: string + description: Filter meal plans to date (inclusive). + examples: + DateFormat: + value: '1972-12-05' + summary: Date Format + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + text/calendar: + schema: + type: string + description: '' + /api/meal-type/: + get: + operationId: apiMealTypeList + description: |- + returns list of meal types created by the + requesting user ordered by the order field. + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedMealTypeList' + description: '' + post: + operationId: apiMealTypeCreate + description: |- + returns list of meal types created by the + requesting user ordered by the order field. + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MealType' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/MealType' + multipart/form-data: + schema: + $ref: '#/components/schemas/MealType' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/MealType' + description: '' + /api/meal-type/{id}/: + get: + operationId: apiMealTypeRetrieve + description: |- + returns list of meal types created by the + requesting user ordered by the order field. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this meal type. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MealType' + description: '' + put: + operationId: apiMealTypeUpdate + description: |- + returns list of meal types created by the + requesting user ordered by the order field. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this meal type. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MealType' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/MealType' + multipart/form-data: + schema: + $ref: '#/components/schemas/MealType' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MealType' + description: '' + patch: + operationId: apiMealTypePartialUpdate + description: |- + returns list of meal types created by the + requesting user ordered by the order field. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this meal type. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedMealType' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedMealType' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedMealType' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MealType' + description: '' + delete: + operationId: apiMealTypeDestroy + description: |- + returns list of meal types created by the + requesting user ordered by the order field. + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this meal type. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/meal-type/{id}/cascading/: + get: + operationId: apiMealTypeCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this meal type. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/meal-type/{id}/nulling/: + get: + operationId: apiMealTypeNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this meal type. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/meal-type/{id}/protecting/: + get: + operationId: apiMealTypeProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this meal type. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/property/: + get: + operationId: apiPropertyList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPropertyList' + description: '' + post: + operationId: apiPropertyCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Property' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Property' + multipart/form-data: + schema: + $ref: '#/components/schemas/Property' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Property' + description: '' + /api/property-type/: + get: + operationId: apiPropertyTypeList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: category + schema: + type: array + items: + type: string + enum: + - ALLERGEN + - GOAL + - NUTRITION + - OTHER + - PRICE + description: Return the PropertyTypes matching the property category. Repeat + for multiple. + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPropertyTypeList' + description: '' + post: + operationId: apiPropertyTypeCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PropertyType' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PropertyType' + multipart/form-data: + schema: + $ref: '#/components/schemas/PropertyType' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/PropertyType' + description: '' + /api/property-type/{id}/: + get: + operationId: apiPropertyTypeRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this property type. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PropertyType' + description: '' + put: + operationId: apiPropertyTypeUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this property type. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PropertyType' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PropertyType' + multipart/form-data: + schema: + $ref: '#/components/schemas/PropertyType' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PropertyType' + description: '' + patch: + operationId: apiPropertyTypePartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this property type. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedPropertyType' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedPropertyType' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedPropertyType' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PropertyType' + description: '' + delete: + operationId: apiPropertyTypeDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this property type. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/property-type/{id}/cascading/: + get: + operationId: apiPropertyTypeCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this property type. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/property-type/{id}/nulling/: + get: + operationId: apiPropertyTypeNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this property type. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/property-type/{id}/protecting/: + get: + operationId: apiPropertyTypeProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this property type. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/property/{id}/: + get: + operationId: apiPropertyRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this property. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Property' + description: '' + put: + operationId: apiPropertyUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this property. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Property' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Property' + multipart/form-data: + schema: + $ref: '#/components/schemas/Property' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Property' + description: '' + patch: + operationId: apiPropertyPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this property. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedProperty' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedProperty' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedProperty' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Property' + description: '' + delete: + operationId: apiPropertyDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this property. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/recipe/: + get: + operationId: apiRecipeList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: books + schema: + type: array + items: + type: integer + description: ID of book a recipe should be in. For multiple repeat parameter. + - in: query + name: books_and + schema: + type: array + items: + type: integer + description: Book IDs, repeat for multiple. Return recipes with all of the + books. + - in: query + name: books_and_not + schema: + type: array + items: + type: integer + description: Book IDs, repeat for multiple. Exclude recipes with all of the + books. + - in: query + name: books_or + schema: + type: array + items: + type: integer + description: Book IDs, repeat for multiple. Return recipes with any of the + books + - in: query + name: books_or_not + schema: + type: array + items: + type: integer + description: Book IDs, repeat for multiple. Exclude recipes with any of the + books. + - in: query + name: cookedon_gte + schema: + type: string + format: date + description: Filter recipes last cooked on the given date or after. + - in: query + name: cookedon_lte + schema: + type: string + format: date + description: Filter recipes last cooked on the given date or before. + - in: query + name: createdby + schema: + type: integer + description: Filter recipes for ones created by the given user ID + - in: query + name: createdon + schema: + type: string + format: date + description: Filter recipes created on the given date. + - in: query + name: createdon_gte + schema: + type: string + format: date + description: Filter recipes created on the given date or after. + - in: query + name: createdon_lte + schema: + type: string + format: date + description: Filter recipes created on the given date or before. + - in: query + name: filter + schema: + type: integer + description: ID of a custom filter. Returns all recipes matched by that filter. + - in: query + name: foods + schema: + type: array + items: + type: integer + description: ID of food a recipe should have. For multiple repeat parameter. + - in: query + name: foods_and + schema: + type: array + items: + type: integer + description: Food IDs, repeat for multiple. Return recipes with all of the + foods. + - in: query + name: foods_and_not + schema: + type: array + items: + type: integer + description: Food IDs, repeat for multiple. Exclude recipes with all of the + foods. + - in: query + name: foods_or + schema: + type: array + items: + type: integer + description: Food IDs, repeat for multiple. Return recipes with any of the + foods + - in: query + name: foods_or_not + schema: + type: array + items: + type: integer + description: Food IDs, repeat for multiple. Exclude recipes with any of the + foods. + - in: query + name: internal + schema: + type: boolean + description: If only internal recipes should be returned. [true/false] + - in: query + name: keywords + schema: + type: array + items: + type: integer + description: ID of keyword a recipe should have. For multiple repeat parameter. + Equivalent to keywords_or + - in: query + name: keywords_and + schema: + type: array + items: + type: integer + description: Keyword IDs, repeat for multiple. Return recipes with all of + the keywords. + - in: query + name: keywords_and_not + schema: + type: array + items: + type: integer + description: Keyword IDs, repeat for multiple. Exclude recipes with all of + the keywords. + - in: query + name: keywords_or + schema: + type: array + items: + type: integer + description: Keyword IDs, repeat for multiple. Return recipes with any of + the keywords + - in: query + name: keywords_or_not + schema: + type: array + items: + type: integer + description: Keyword IDs, repeat for multiple. Exclude recipes with any of + the keywords. + - in: query + name: makenow + schema: + type: boolean + description: Filter recipes that can be made with OnHand food. [true/false] + - in: query + name: new + schema: + type: boolean + description: Returns new results first in search results. [true/false] + - in: query + name: num_recent + schema: + type: integer + description: Returns the given number of recently viewed recipes before search + results (if given) + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: Query string matched (fuzzy) against recipe name. In the future + also fulltext search. + - in: query + name: random + schema: + type: boolean + description: Returns the results in randomized order. [true/false] + - in: query + name: rating + schema: + type: integer + description: Exact rating of recipe + - in: query + name: rating_gte + schema: + type: integer + description: Rating a recipe should have or greater. + - in: query + name: rating_lte + schema: + type: integer + description: Rating a recipe should have or smaller. + - in: query + name: sort_order + schema: + type: string + description: 'Determines the order of the results. Options are: score,-score,name,-name,lastcooked,-lastcooked,rating,-rating,times_cooked,-times_cooked,created_at,-created_at,lastviewed,-lastviewed' + - in: query + name: timescooked + schema: + type: integer + description: Filter recipes cooked X times. + - in: query + name: timescooked_gte + schema: + type: integer + description: Filter recipes cooked X times or more. + - in: query + name: timescooked_lte + schema: + type: integer + description: Filter recipes cooked X times or less. + - in: query + name: units + schema: + type: integer + description: ID of unit a recipe should have. + - in: query + name: updatedon + schema: + type: string + format: date + description: Filter recipes updated on the given date. + - in: query + name: updatedon_gte + schema: + type: string + format: date + description: Filter recipes updated on the given date. + - in: query + name: updatedon_lte + schema: + type: string + format: date + description: Filter recipes updated on the given date. + - in: query + name: viewedon_gte + schema: + type: string + format: date + description: Filter recipes lasts viewed on the given date. + - in: query + name: viewedon_lte + schema: + type: string + format: date + description: Filter recipes lasts viewed on the given date. + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRecipeOverviewList' + description: '' + post: + operationId: apiRecipeCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Recipe' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Recipe' + multipart/form-data: + schema: + $ref: '#/components/schemas/Recipe' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Recipe' + description: '' + /api/recipe-book/: + get: + operationId: apiRecipeBookList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: limit + schema: + type: string + description: limit number of entries to return + - in: query + name: order_direction + schema: + type: string + enum: + - asc + - desc + description: Order ascending or descending + - in: query + name: order_field + schema: + type: string + enum: + - id + - name + - order + description: Field to order recipe books on + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: lookup if query string is contained within the name, case insensitive + - in: query + name: random + schema: + type: string + description: randomly orders entries (only works together with limit) + - in: query + name: updated_at + schema: + type: string + description: if model has an updated_at timestamp, filter only models updated + at or after datetime + examples: + DateFormat: + value: '1972-12-05' + summary: Date Format + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRecipeBookList' + description: '' + post: + operationId: apiRecipeBookCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBook' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RecipeBook' + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeBook' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBook' + description: '' + /api/recipe-book-entry/: + get: + operationId: apiRecipeBookEntryList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: book + schema: + type: integer + description: id of book - only return recipes in that book + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: recipe + schema: + type: integer + description: id of recipe - only return books for that recipe + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRecipeBookEntryList' + description: '' + post: + operationId: apiRecipeBookEntryCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBookEntry' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RecipeBookEntry' + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeBookEntry' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBookEntry' + description: '' + /api/recipe-book-entry/{id}/: + get: + operationId: apiRecipeBookEntryRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe book entry. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBookEntry' + description: '' + put: + operationId: apiRecipeBookEntryUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe book entry. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBookEntry' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RecipeBookEntry' + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeBookEntry' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBookEntry' + description: '' + patch: + operationId: apiRecipeBookEntryPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe book entry. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedRecipeBookEntry' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedRecipeBookEntry' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedRecipeBookEntry' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBookEntry' + description: '' + delete: + operationId: apiRecipeBookEntryDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe book entry. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/recipe-book/{id}/: + get: + operationId: apiRecipeBookRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe book. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBook' + description: '' + put: + operationId: apiRecipeBookUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe book. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBook' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RecipeBook' + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeBook' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBook' + description: '' + patch: + operationId: apiRecipeBookPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe book. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedRecipeBook' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedRecipeBook' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedRecipeBook' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBook' + description: '' + delete: + operationId: apiRecipeBookDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe book. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/recipe-book/{id}/cascading/: + get: + operationId: apiRecipeBookCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe book. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/recipe-book/{id}/nulling/: + get: + operationId: apiRecipeBookNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe book. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/recipe-book/{id}/protecting/: + get: + operationId: apiRecipeBookProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe book. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/recipe-from-source/: + post: + operationId: apiRecipeFromSourceCreate + description: |- + function to retrieve a recipe from a given url or source string + :param request: standard request with additional post parameters + - url: url to use for importing recipe + - data: if no url is given recipe is imported from provided source data + - (optional) bookmarklet: id of bookmarklet import to use, overrides URL and data attributes + :return: JsonResponse containing the parsed json and images + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeFromSource' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RecipeFromSource' + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeFromSource' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeFromSourceResponse' + description: '' + /api/recipe-import/: + get: + operationId: apiRecipeImportList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRecipeImportList' + description: '' + post: + operationId: apiRecipeImportCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeImport' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RecipeImport' + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeImport' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeImport' + description: '' + /api/recipe-import/{id}/: + get: + operationId: apiRecipeImportRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe import. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeImport' + description: '' + put: + operationId: apiRecipeImportUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe import. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeImport' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RecipeImport' + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeImport' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeImport' + description: '' + patch: + operationId: apiRecipeImportPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe import. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedRecipeImport' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedRecipeImport' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedRecipeImport' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeImport' + description: '' + delete: + operationId: apiRecipeImportDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe import. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/recipe-import/{id}/import_recipe/: + post: + operationId: apiRecipeImportImportRecipeCreate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe import. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeImport' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RecipeImport' + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeImport' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Recipe' + description: '' + /api/recipe-import/import_all/: + post: + operationId: apiRecipeImportImportAllCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeImport' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RecipeImport' + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeImport' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeImport' + description: '' + /api/recipe/{id}/: + get: + operationId: apiRecipeRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe. + required: true + - in: query + name: share + schema: + type: string + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Recipe' + description: '' + put: + operationId: apiRecipeUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Recipe' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Recipe' + multipart/form-data: + schema: + $ref: '#/components/schemas/Recipe' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Recipe' + description: '' + patch: + operationId: apiRecipePartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedRecipe' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedRecipe' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedRecipe' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Recipe' + description: '' + delete: + operationId: apiRecipeDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/recipe/{id}/aiproperties/: + post: + operationId: apiRecipeAipropertiesCreate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe. + required: true + - in: query + name: provider + schema: + type: integer + description: ID of the AI provider that should be used for this AI request + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Recipe' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Recipe' + multipart/form-data: + schema: + $ref: '#/components/schemas/Recipe' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Recipe' + description: '' + /api/recipe/{id}/cascading/: + get: + operationId: apiRecipeCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/recipe/{id}/delete_external/: + patch: + operationId: apiRecipeDeleteExternalPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedRecipe' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedRecipe' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedRecipe' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Recipe' + description: '' + /api/recipe/{id}/image/: + put: + operationId: apiRecipeImageUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe. + required: true + tags: + - api + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeImage' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeImage' + description: '' + /api/recipe/{id}/nulling/: + get: + operationId: apiRecipeNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/recipe/{id}/protecting/: + get: + operationId: apiRecipeProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/recipe/{id}/related/: + get: + operationId: apiRecipeRelatedList + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RecipeSimple' + description: '' + /api/recipe/{id}/shopping/: + put: + operationId: apiRecipeShoppingUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this recipe. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeShoppingUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RecipeShoppingUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeShoppingUpdate' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeShoppingUpdate' + description: '' + /api/recipe/batch_update/: + put: + operationId: apiRecipeBatchUpdateUpdate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBatchUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RecipeBatchUpdate' + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeBatchUpdate' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RecipeBatchUpdate' + description: '' + /api/recipe/flat/: + get: + operationId: apiRecipeFlatList + description: logs request counts to redis cache total/per user/ + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RecipeFlat' + description: '' + /api/reset-food-inheritance/: + post: + operationId: apiResetFoodInheritanceCreate + description: function to reset inheritance from api, see food method for docs + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + description: No response body + /api/search-fields/: + get: + operationId: apiSearchFieldsList + description: logs request counts to redis cache total/per user/ + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SearchFields' + description: '' + /api/search-fields/{id}/: + get: + operationId: apiSearchFieldsRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this search fields. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SearchFields' + description: '' + /api/search-preference/: + get: + operationId: apiSearchPreferenceList + description: logs request counts to redis cache total/per user/ + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SearchPreference' + description: '' + /api/search-preference/{user}/: + get: + operationId: apiSearchPreferenceRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: user + schema: + type: integer + description: A unique value identifying this search preference. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SearchPreference' + description: '' + patch: + operationId: apiSearchPreferencePartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: user + schema: + type: integer + description: A unique value identifying this search preference. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedSearchPreference' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedSearchPreference' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedSearchPreference' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SearchPreference' + description: '' + /api/server-settings/current/: + get: + operationId: apiServerSettingsCurrentRetrieve + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ServerSettings' + description: '' + /api/share-link/{id}: + get: + operationId: apiShareLinkRetrieve + parameters: + - in: path + name: id + schema: + type: integer + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ShareLink' + description: '' + /api/shopping-list-entry/: + get: + operationId: apiShoppingListEntryList + description: |- + individual entries of a shopping list + automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint + parameters: + - in: query + name: mealplan + schema: + type: integer + description: Returns only entries associated with the given mealplan id + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: updated_after + schema: + type: string + format: date-time + description: Returns only elements updated after the given timestamp in ISO + 8601 format. + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedShoppingListEntryList' + description: '' + post: + operationId: apiShoppingListEntryCreate + description: |- + individual entries of a shopping list + automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListEntry' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ShoppingListEntry' + multipart/form-data: + schema: + $ref: '#/components/schemas/ShoppingListEntry' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListEntry' + description: '' + /api/shopping-list-entry/{id}/: + get: + operationId: apiShoppingListEntryRetrieve + description: |- + individual entries of a shopping list + automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this shopping list entry. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListEntry' + description: '' + put: + operationId: apiShoppingListEntryUpdate + description: |- + individual entries of a shopping list + automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this shopping list entry. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListEntry' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ShoppingListEntry' + multipart/form-data: + schema: + $ref: '#/components/schemas/ShoppingListEntry' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListEntry' + description: '' + patch: + operationId: apiShoppingListEntryPartialUpdate + description: |- + individual entries of a shopping list + automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this shopping list entry. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedShoppingListEntry' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedShoppingListEntry' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedShoppingListEntry' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListEntry' + description: '' + delete: + operationId: apiShoppingListEntryDestroy + description: |- + individual entries of a shopping list + automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this shopping list entry. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/shopping-list-entry/bulk/: + post: + operationId: apiShoppingListEntryBulkCreate + description: |- + individual entries of a shopping list + automatically filtered to only contain unchecked items that are not older than the shopping recent days setting to not bloat endpoint + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListEntryBulk' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ShoppingListEntryBulk' + multipart/form-data: + schema: + $ref: '#/components/schemas/ShoppingListEntryBulk' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListEntryBulk' + description: '' + /api/shopping-list-recipe/: + get: + operationId: apiShoppingListRecipeList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: mealplan + schema: + type: integer + description: Returns only entries associated with the given mealplan id + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedShoppingListRecipeList' + description: '' + post: + operationId: apiShoppingListRecipeCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListRecipe' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ShoppingListRecipe' + multipart/form-data: + schema: + $ref: '#/components/schemas/ShoppingListRecipe' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListRecipe' + description: '' + /api/shopping-list-recipe/{id}/: + get: + operationId: apiShoppingListRecipeRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this shopping list recipe. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListRecipe' + description: '' + put: + operationId: apiShoppingListRecipeUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this shopping list recipe. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListRecipe' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ShoppingListRecipe' + multipart/form-data: + schema: + $ref: '#/components/schemas/ShoppingListRecipe' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListRecipe' + description: '' + patch: + operationId: apiShoppingListRecipePartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this shopping list recipe. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedShoppingListRecipe' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedShoppingListRecipe' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedShoppingListRecipe' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListRecipe' + description: '' + delete: + operationId: apiShoppingListRecipeDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this shopping list recipe. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/shopping-list-recipe/{id}/bulk_create_entries/: + post: + operationId: apiShoppingListRecipeBulkCreateEntriesCreate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this shopping list recipe. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListEntryBulkCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ShoppingListEntryBulkCreate' + multipart/form-data: + schema: + $ref: '#/components/schemas/ShoppingListEntryBulkCreate' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ShoppingListEntryBulkCreate' + description: '' + /api/space/: + get: + operationId: apiSpaceList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSpaceList' + description: '' + post: + operationId: apiSpaceCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Space' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Space' + multipart/form-data: + schema: + $ref: '#/components/schemas/Space' + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Space' + description: '' + /api/space/{id}/: + get: + operationId: apiSpaceRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this space. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Space' + description: '' + put: + operationId: apiSpaceUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this space. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Space' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Space' + multipart/form-data: + schema: + $ref: '#/components/schemas/Space' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Space' + description: '' + patch: + operationId: apiSpacePartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this space. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedSpace' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedSpace' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedSpace' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Space' + description: '' + /api/space/current/: + get: + operationId: apiSpaceCurrentRetrieve + description: logs request counts to redis cache total/per user/ + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Space' + description: '' + /api/step/: + get: + operationId: apiStepList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: Query string matched (fuzzy) against object name. + - in: query + name: recipe + schema: + type: array + items: + type: integer + description: ID of recipe a step is part of. For multiple repeat parameter. + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedStepList' + description: '' + post: + operationId: apiStepCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Step' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Step' + multipart/form-data: + schema: + $ref: '#/components/schemas/Step' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Step' + description: '' + /api/step/{id}/: + get: + operationId: apiStepRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this step. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Step' + description: '' + put: + operationId: apiStepUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this step. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Step' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Step' + multipart/form-data: + schema: + $ref: '#/components/schemas/Step' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Step' + description: '' + patch: + operationId: apiStepPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this step. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedStep' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedStep' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedStep' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Step' + description: '' + delete: + operationId: apiStepDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this step. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/storage/: + get: + operationId: apiStorageList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedStorageList' + description: '' + post: + operationId: apiStorageCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Storage' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Storage' + multipart/form-data: + schema: + $ref: '#/components/schemas/Storage' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Storage' + description: '' + /api/storage/{id}/: + get: + operationId: apiStorageRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this storage. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Storage' + description: '' + put: + operationId: apiStorageUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this storage. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Storage' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Storage' + multipart/form-data: + schema: + $ref: '#/components/schemas/Storage' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Storage' + description: '' + patch: + operationId: apiStoragePartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this storage. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedStorage' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedStorage' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedStorage' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Storage' + description: '' + delete: + operationId: apiStorageDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this storage. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/storage/{id}/cascading/: + get: + operationId: apiStorageCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this storage. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/storage/{id}/nulling/: + get: + operationId: apiStorageNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this storage. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/storage/{id}/protecting/: + get: + operationId: apiStorageProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this storage. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/supermarket/: + get: + operationId: apiSupermarketList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: limit + schema: + type: string + description: limit number of entries to return + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: lookup if query string is contained within the name, case insensitive + - in: query + name: random + schema: + type: string + description: randomly orders entries (only works together with limit) + - in: query + name: updated_at + schema: + type: string + description: if model has an updated_at timestamp, filter only models updated + at or after datetime + examples: + DateFormat: + value: '1972-12-05' + summary: Date Format + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSupermarketList' + description: '' + post: + operationId: apiSupermarketCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Supermarket' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Supermarket' + multipart/form-data: + schema: + $ref: '#/components/schemas/Supermarket' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Supermarket' + description: '' + /api/supermarket-category/: + get: + operationId: apiSupermarketCategoryList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: limit + schema: + type: string + description: limit number of entries to return + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: lookup if query string is contained within the name, case insensitive + - in: query + name: random + schema: + type: string + description: randomly orders entries (only works together with limit) + - in: query + name: updated_at + schema: + type: string + description: if model has an updated_at timestamp, filter only models updated + at or after datetime + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSupermarketCategoryList' + description: '' + post: + operationId: apiSupermarketCategoryCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategory' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SupermarketCategory' + multipart/form-data: + schema: + $ref: '#/components/schemas/SupermarketCategory' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategory' + description: '' + /api/supermarket-category-relation/: + get: + operationId: apiSupermarketCategoryRelationList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: limit + schema: + type: string + description: limit number of entries to return + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: lookup if query string is contained within the name, case insensitive + - in: query + name: random + schema: + type: string + description: randomly orders entries (only works together with limit) + - in: query + name: updated_at + schema: + type: string + description: if model has an updated_at timestamp, filter only models updated + at or after datetime + examples: + DateFormat: + value: '1972-12-05' + summary: Date Format + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSupermarketCategoryRelationList' + description: '' + post: + operationId: apiSupermarketCategoryRelationCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategoryRelation' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SupermarketCategoryRelation' + multipart/form-data: + schema: + $ref: '#/components/schemas/SupermarketCategoryRelation' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategoryRelation' + description: '' + /api/supermarket-category-relation/{id}/: + get: + operationId: apiSupermarketCategoryRelationRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket category + relation. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategoryRelation' + description: '' + put: + operationId: apiSupermarketCategoryRelationUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket category + relation. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategoryRelation' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SupermarketCategoryRelation' + multipart/form-data: + schema: + $ref: '#/components/schemas/SupermarketCategoryRelation' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategoryRelation' + description: '' + patch: + operationId: apiSupermarketCategoryRelationPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket category + relation. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedSupermarketCategoryRelation' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedSupermarketCategoryRelation' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedSupermarketCategoryRelation' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategoryRelation' + description: '' + delete: + operationId: apiSupermarketCategoryRelationDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket category + relation. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/supermarket-category/{id}/: + get: + operationId: apiSupermarketCategoryRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket category. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategory' + description: '' + put: + operationId: apiSupermarketCategoryUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket category. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategory' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SupermarketCategory' + multipart/form-data: + schema: + $ref: '#/components/schemas/SupermarketCategory' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategory' + description: '' + patch: + operationId: apiSupermarketCategoryPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket category. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedSupermarketCategory' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedSupermarketCategory' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedSupermarketCategory' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategory' + description: '' + delete: + operationId: apiSupermarketCategoryDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket category. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/supermarket-category/{id}/cascading/: + get: + operationId: apiSupermarketCategoryCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket category. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/supermarket-category/{id}/merge/{target}/: + put: + operationId: apiSupermarketCategoryMergeUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket category. + required: true + - in: path + name: target + schema: + type: integer + description: The ID of the {obj} you want to merge with. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategory' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SupermarketCategory' + multipart/form-data: + schema: + $ref: '#/components/schemas/SupermarketCategory' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SupermarketCategory' + description: '' + /api/supermarket-category/{id}/nulling/: + get: + operationId: apiSupermarketCategoryNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket category. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/supermarket-category/{id}/protecting/: + get: + operationId: apiSupermarketCategoryProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket category. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/supermarket/{id}/: + get: + operationId: apiSupermarketRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Supermarket' + description: '' + put: + operationId: apiSupermarketUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Supermarket' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Supermarket' + multipart/form-data: + schema: + $ref: '#/components/schemas/Supermarket' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Supermarket' + description: '' + patch: + operationId: apiSupermarketPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedSupermarket' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedSupermarket' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedSupermarket' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Supermarket' + description: '' + delete: + operationId: apiSupermarketDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/supermarket/{id}/cascading/: + get: + operationId: apiSupermarketCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/supermarket/{id}/nulling/: + get: + operationId: apiSupermarketNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/supermarket/{id}/protecting/: + get: + operationId: apiSupermarketProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this supermarket. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/switch-active-space/{spaceId}/: + get: + operationId: apiSwitchActiveSpaceRetrieve + description: api endpoint to switch space function + parameters: + - in: path + name: spaceId + schema: + type: integer + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + description: No response body + /api/sync/: + get: + operationId: apiSyncList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSyncList' + description: '' + post: + operationId: apiSyncCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Sync' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Sync' + multipart/form-data: + schema: + $ref: '#/components/schemas/Sync' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Sync' + description: '' + /api/sync-log/: + get: + operationId: apiSyncLogList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSyncLogList' + description: '' + /api/sync-log/{id}/: + get: + operationId: apiSyncLogRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this sync log. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyncLog' + description: '' + /api/sync/{id}/: + get: + operationId: apiSyncRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this sync. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Sync' + description: '' + put: + operationId: apiSyncUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this sync. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Sync' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Sync' + multipart/form-data: + schema: + $ref: '#/components/schemas/Sync' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Sync' + description: '' + patch: + operationId: apiSyncPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this sync. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedSync' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedSync' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedSync' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Sync' + description: '' + delete: + operationId: apiSyncDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this sync. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/sync/{id}/cascading/: + get: + operationId: apiSyncCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this sync. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/sync/{id}/nulling/: + get: + operationId: apiSyncNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this sync. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/sync/{id}/protecting/: + get: + operationId: apiSyncProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this sync. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/sync/{id}/query_synced_folder/: + post: + operationId: apiSyncQuerySyncedFolderCreate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this sync. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Sync' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Sync' + multipart/form-data: + schema: + $ref: '#/components/schemas/Sync' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyncLog' + description: '' + /api/unit/: + get: + operationId: apiUnitList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: limit + schema: + type: string + description: limit number of entries to return + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: lookup if query string is contained within the name, case insensitive + - in: query + name: random + schema: + type: string + description: randomly orders entries (only works together with limit) + - in: query + name: updated_at + schema: + type: string + description: if model has an updated_at timestamp, filter only models updated + at or after datetime + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUnitList' + description: '' + post: + operationId: apiUnitCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Unit' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Unit' + multipart/form-data: + schema: + $ref: '#/components/schemas/Unit' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Unit' + description: '' + /api/unit-conversion/: + get: + operationId: apiUnitConversionList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: food_id + schema: + type: integer + description: ID of food to filter for + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: query that looks into food, base unit or converted unit by name + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUnitConversionList' + description: '' + post: + operationId: apiUnitConversionCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UnitConversion' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/UnitConversion' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnitConversion' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/UnitConversion' + description: '' + /api/unit-conversion/{id}/: + get: + operationId: apiUnitConversionRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this unit conversion. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UnitConversion' + description: '' + put: + operationId: apiUnitConversionUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this unit conversion. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UnitConversion' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/UnitConversion' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnitConversion' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UnitConversion' + description: '' + patch: + operationId: apiUnitConversionPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this unit conversion. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedUnitConversion' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedUnitConversion' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedUnitConversion' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UnitConversion' + description: '' + delete: + operationId: apiUnitConversionDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this unit conversion. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/unit/{id}/: + get: + operationId: apiUnitRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this unit. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Unit' + description: '' + put: + operationId: apiUnitUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this unit. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Unit' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Unit' + multipart/form-data: + schema: + $ref: '#/components/schemas/Unit' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Unit' + description: '' + patch: + operationId: apiUnitPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this unit. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedUnit' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedUnit' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedUnit' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Unit' + description: '' + delete: + operationId: apiUnitDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this unit. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/unit/{id}/cascading/: + get: + operationId: apiUnitCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this unit. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/unit/{id}/merge/{target}/: + put: + operationId: apiUnitMergeUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this unit. + required: true + - in: path + name: target + schema: + type: integer + description: The ID of the {obj} you want to merge with. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Unit' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Unit' + multipart/form-data: + schema: + $ref: '#/components/schemas/Unit' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Unit' + description: '' + /api/unit/{id}/nulling/: + get: + operationId: apiUnitNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this unit. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/unit/{id}/protecting/: + get: + operationId: apiUnitProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this unit. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/user/: + get: + operationId: apiUserList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: filter_list + schema: + type: array + items: + type: string + description: User IDs, repeat for multiple + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + description: '' + /api/user-file/: + get: + operationId: apiUserFileList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: limit + schema: + type: string + description: limit number of entries to return + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: query + schema: + type: string + description: lookup if query string is contained within the name, case insensitive + - in: query + name: random + schema: + type: string + description: randomly orders entries (only works together with limit) + - in: query + name: updated_at + schema: + type: string + description: if model has an updated_at timestamp, filter only models updated + at or after datetime + examples: + DateFormat: + value: '1972-12-05' + summary: Date Format + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUserFileList' + description: '' + post: + operationId: apiUserFileCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/UserFile' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/UserFile' + description: '' + /api/user-file/{id}/: + get: + operationId: apiUserFileRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this user file. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserFile' + description: '' + put: + operationId: apiUserFileUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this user file. + required: true + tags: + - api + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/UserFile' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserFile' + description: '' + patch: + operationId: apiUserFilePartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this user file. + required: true + tags: + - api + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedUserFile' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserFile' + description: '' + delete: + operationId: apiUserFileDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this user file. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/user-file/{id}/cascading/: + get: + operationId: apiUserFileCascadingList + description: get a paginated list of objects that will be cascaded (deleted) + when deleting the selected object + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this user file. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/user-file/{id}/nulling/: + get: + operationId: apiUserFileNullingList + description: get a paginated list of objects where the selected object will + be removed whe its deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this user file. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/user-file/{id}/protecting/: + get: + operationId: apiUserFileProtectingList + description: get a paginated list of objects that are protecting the selected + object form being deleted + parameters: + - in: query + name: cache + schema: + type: boolean + default: true + description: If results can be cached or not + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this user file. + required: true + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGenericModelReferenceList' + description: '' + /api/user-preference/: + get: + operationId: apiUserPreferenceList + description: logs request counts to redis cache total/per user/ + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserPreference' + description: '' + /api/user-preference/{user}/: + get: + operationId: apiUserPreferenceRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: user + schema: + type: integer + description: A unique value identifying this user preference. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserPreference' + description: '' + patch: + operationId: apiUserPreferencePartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: user + schema: + type: integer + description: A unique value identifying this user preference. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedUserPreference' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedUserPreference' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedUserPreference' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserPreference' + description: '' + /api/user-space/: + get: + operationId: apiUserSpaceList + description: logs request counts to redis cache total/per user/ + parameters: + - in: query + name: internal_note + schema: + type: string + description: text field to store information about the invite link + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUserSpaceList' + description: '' + /api/user-space/{id}/: + get: + operationId: apiUserSpaceRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this user space. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserSpace' + description: '' + put: + operationId: apiUserSpaceUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this user space. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserSpace' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/UserSpace' + multipart/form-data: + schema: + $ref: '#/components/schemas/UserSpace' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserSpace' + description: '' + patch: + operationId: apiUserSpacePartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this user space. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedUserSpace' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedUserSpace' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedUserSpace' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserSpace' + description: '' + delete: + operationId: apiUserSpaceDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this user space. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body + /api/user-space/all_personal/: + get: + operationId: apiUserSpaceAllPersonalList + description: |- + return all userspaces for the user requesting the endpoint + :param request: + :return: + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUserSpaceList' + description: '' + /api/user/{id}/: + get: + operationId: apiUserRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this utente. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: '' + patch: + operationId: apiUserPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this utente. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedUser' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedUser' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedUser' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: '' + /api/view-log/: + get: + operationId: apiViewLogList + description: logs request counts to redis cache total/per user/ + parameters: + - name: page + required: false + in: query + description: A page number within the paginated result set. + schema: + type: integer + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedViewLogList' + description: '' + post: + operationId: apiViewLogCreate + description: logs request counts to redis cache total/per user/ + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ViewLog' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ViewLog' + multipart/form-data: + schema: + $ref: '#/components/schemas/ViewLog' + required: true + security: + - ApiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ViewLog' + description: '' + /api/view-log/{id}/: + get: + operationId: apiViewLogRetrieve + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this view log. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ViewLog' + description: '' + put: + operationId: apiViewLogUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this view log. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ViewLog' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ViewLog' + multipart/form-data: + schema: + $ref: '#/components/schemas/ViewLog' + required: true + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ViewLog' + description: '' + patch: + operationId: apiViewLogPartialUpdate + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this view log. + required: true + tags: + - api + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedViewLog' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedViewLog' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedViewLog' + security: + - ApiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ViewLog' + description: '' + delete: + operationId: apiViewLogDestroy + description: logs request counts to redis cache total/per user/ + parameters: + - in: path + name: id + schema: + type: integer + description: A unique integer value identifying this view log. + required: true + tags: + - api + security: + - ApiKeyAuth: [] + responses: + '204': + description: No response body +components: + schemas: + AccessToken: + type: object + properties: + id: + type: integer + readOnly: false + token: + type: string + readOnly: true + expires: + type: string + format: date-time + scope: + type: string + created: + type: string + format: date-time + readOnly: true + updated: + type: string + format: date-time + readOnly: true + required: + - created + - expires + - token + - updated + AiImport: + type: object + properties: + ai_provider_id: + type: integer + file: + type: string + format: uri + nullable: true + text: + type: string + nullable: true + recipe_id: + type: string + nullable: true + required: + - ai_provider_id + - file + - recipe_id + - text + AiLog: + type: object + properties: + id: + type: integer + readOnly: false + ai_provider: + allOf: + - $ref: '#/components/schemas/AiProvider' + readOnly: true + function: + type: string + maxLength: 64 + credit_cost: + type: number + format: double + maximum: 1000000000000 + minimum: -1000000000000 + exclusiveMaximum: true + exclusiveMinimum: true + credits_from_balance: + type: boolean + input_tokens: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + output_tokens: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + start_time: + type: string + format: date-time + nullable: true + end_time: + type: string + format: date-time + nullable: true + created_by: + type: integer + nullable: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + required: + - ai_provider + - created_at + - credit_cost + - function + - updated_at + AiProvider: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + description: + type: string + api_key: + type: string + writeOnly: true + model_name: + type: string + maxLength: 256 + url: + type: string + nullable: true + maxLength: 2048 + log_credit_cost: + type: boolean + space: + type: integer + nullable: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - model_name + - name + - updated_at + AuthToken: + type: object + properties: + username: + type: string + writeOnly: true + password: + type: string + writeOnly: true + token: + type: string + readOnly: true + required: + - password + - token + - username + AutoMealPlan: + type: object + properties: + start_date: + type: string + format: date-time + end_date: + type: string + format: date-time + meal_type_id: + type: integer + keyword_ids: + type: array + items: {} + servings: + type: number + format: double + shared: + type: array + items: + $ref: '#/components/schemas/User' + nullable: true + addshopping: + type: boolean + required: + - addshopping + - end_date + - keyword_ids + - meal_type_id + - servings + - start_date + Automation: + type: object + properties: + id: + type: integer + readOnly: false + type: + $ref: '#/components/schemas/AutomationTypeEnum' + name: + type: string + maxLength: 128 + description: + type: string + nullable: true + param_1: + type: string + nullable: true + maxLength: 128 + param_2: + type: string + nullable: true + maxLength: 128 + param_3: + type: string + nullable: true + maxLength: 128 + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + disabled: + type: boolean + created_by: + type: integer + readOnly: true + required: + - created_by + - type + AutomationTypeEnum: + enum: + - FOOD_ALIAS + - UNIT_ALIAS + - KEYWORD_ALIAS + - DESCRIPTION_REPLACE + - INSTRUCTION_REPLACE + - NEVER_UNIT + - TRANSPOSE_WORDS + - FOOD_REPLACE + - UNIT_REPLACE + - NAME_REPLACE + type: string + description: |- + * `FOOD_ALIAS` - Food Alias + * `UNIT_ALIAS` - Unit Alias + * `KEYWORD_ALIAS` - Keyword Alias + * `DESCRIPTION_REPLACE` - Description Replace + * `INSTRUCTION_REPLACE` - Instruction Replace + * `NEVER_UNIT` - Never Unit + * `TRANSPOSE_WORDS` - Transpose Words + * `FOOD_REPLACE` - Food Replace + * `UNIT_REPLACE` - Unit Replace + * `NAME_REPLACE` - Name Replace + BookmarkletImport: + type: object + properties: + id: + type: integer + readOnly: false + url: + type: string + nullable: true + maxLength: 256 + html: + type: string + created_by: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - created_by + - html + BookmarkletImportList: + type: object + properties: + id: + type: integer + readOnly: false + url: + type: string + nullable: true + maxLength: 256 + created_by: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - created_by + ConnectorConfig: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + minLength: 1 + type: + $ref: '#/components/schemas/ConnectorConfigTypeEnum' + url: + type: string + format: uri + nullable: true + maxLength: 200 + token: + type: string + writeOnly: true + nullable: true + maxLength: 512 + todo_entity: + type: string + nullable: true + maxLength: 128 + enabled: + type: boolean + description: Is Connector Enabled + on_shopping_list_entry_created_enabled: + type: boolean + on_shopping_list_entry_updated_enabled: + type: boolean + on_shopping_list_entry_deleted_enabled: + type: boolean + supports_description_field: + type: boolean + description: Does the todo entity support the description field + created_by: + type: integer + readOnly: true + required: + - created_by + - name + ConnectorConfigTypeEnum: + enum: + - HomeAssistant + type: string + description: '* `HomeAssistant` - HomeAssistant' + CookLog: + type: object + properties: + id: + type: integer + readOnly: false + recipe: + type: integer + servings: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + nullable: true + rating: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + nullable: true + comment: + type: string + nullable: true + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + readOnly: true + required: + - created_by + - recipe + - updated_at + CustomFilter: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + search: + type: string + shared: + type: array + items: + $ref: '#/components/schemas/User' + created_by: + type: integer + readOnly: true + required: + - created_by + - name + - search + DefaultPageEnum: + enum: + - SEARCH + - PLAN + - BOOKS + - SHOPPING + type: string + description: |- + * `SEARCH` - Search + * `PLAN` - Meal-Plan + * `BOOKS` - Books + * `SHOPPING` - Shopping + DeleteEnum: + enum: + - 'true' + type: string + description: '* `true` - true' + ExportLog: + type: object + properties: + id: + type: integer + readOnly: false + type: + type: string + maxLength: 32 + msg: + type: string + running: + type: boolean + total_recipes: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + exported_recipes: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + cache_duration: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + possibly_not_expired: + type: boolean + created_by: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - created_by + - type + ExportRequest: + type: object + properties: + type: + type: string + all: + type: boolean + default: false + recipes: + type: array + items: + $ref: '#/components/schemas/RecipeSimple' + default: [] + custom_filter: + allOf: + - $ref: '#/components/schemas/CustomFilter' + nullable: true + required: + - type + FdcQuery: + type: object + properties: + totalHits: + type: integer + currentPage: + type: integer + totalPages: + type: integer + foods: + type: array + items: + $ref: '#/components/schemas/FdcQueryFoods' + required: + - currentPage + - foods + - totalHits + - totalPages + FdcQueryFoods: + type: object + properties: + fdcId: + type: integer + description: + type: string + dataType: + type: string + required: + - dataType + - description + - fdcId + Food: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + minLength: 1 + plural_name: + type: string + nullable: true + maxLength: 128 + description: + type: string + shopping: + type: string + readOnly: true + recipe: + allOf: + - $ref: '#/components/schemas/RecipeSimple' + nullable: true + url: + type: string + nullable: true + maxLength: 1024 + properties: + type: array + items: + $ref: '#/components/schemas/Property' + nullable: true + properties_food_amount: + type: number + format: double + properties_food_unit: + allOf: + - $ref: '#/components/schemas/Unit' + nullable: true + fdc_id: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + nullable: true + food_onhand: + type: boolean + nullable: true + supermarket_category: + allOf: + - $ref: '#/components/schemas/SupermarketCategory' + nullable: true + parent: + type: integer + readOnly: true + numchild: + type: integer + readOnly: true + inherit_fields: + type: array + items: + $ref: '#/components/schemas/FoodInheritField' + nullable: true + full_name: + type: string + description: |- + Returns a string representation of a tree node and it's ancestors, + e.g. 'Cuisine > Asian > Chinese > Catonese'. + readOnly: true + ignore_shopping: + type: boolean + substitute: + type: array + items: + $ref: '#/components/schemas/FoodSimple' + nullable: true + substitute_siblings: + type: boolean + substitute_children: + type: boolean + substitute_onhand: + type: boolean + readOnly: true + child_inherit_fields: + type: array + items: + $ref: '#/components/schemas/FoodInheritField' + nullable: true + open_data_slug: + type: string + nullable: true + maxLength: 128 + required: + - full_name + - name + - numchild + - parent + - shopping + - substitute_onhand + FoodBatchUpdate: + type: object + properties: + foods: + type: array + items: + type: integer + category: + type: integer + nullable: true + substitute_add: + type: array + items: + type: integer + substitute_remove: + type: array + items: + type: integer + substitute_set: + type: array + items: + type: integer + substitute_remove_all: + type: boolean + default: false + inherit_fields_add: + type: array + items: + type: integer + inherit_fields_remove: + type: array + items: + type: integer + inherit_fields_set: + type: array + items: + type: integer + inherit_fields_remove_all: + type: boolean + default: false + child_inherit_fields_add: + type: array + items: + type: integer + child_inherit_fields_remove: + type: array + items: + type: integer + child_inherit_fields_set: + type: array + items: + type: integer + child_inherit_fields_remove_all: + type: boolean + default: false + substitute_children: + type: boolean + nullable: true + substitute_siblings: + type: boolean + nullable: true + ignore_shopping: + type: boolean + nullable: true + on_hand: + type: boolean + nullable: true + parent_remove: + type: boolean + nullable: true + parent_set: + type: integer + nullable: true + required: + - child_inherit_fields_add + - child_inherit_fields_remove + - child_inherit_fields_set + - foods + - inherit_fields_add + - inherit_fields_remove + - inherit_fields_set + - substitute_add + - substitute_remove + - substitute_set + FoodInheritField: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + nullable: true + field: + type: string + nullable: true + required: [] + FoodShoppingUpdate: + type: object + properties: + id: + type: integer + readOnly: false + amount: + type: integer + writeOnly: true + nullable: true + description: Amount of food to add to the shopping list + unit: + type: integer + writeOnly: true + nullable: true + description: ID of unit to use for the shopping list + delete: + allOf: + - $ref: '#/components/schemas/DeleteEnum' + writeOnly: true + nullable: true + description: |- + When set to true will delete all food from active shopping lists. + + * `true` - true + required: + - delete + FoodSimple: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + minLength: 1 + plural_name: + type: string + nullable: true + maxLength: 128 + required: + - name + GenericModelReference: + type: object + properties: + id: + type: integer + readOnly: false + model: + type: string + name: + type: string + required: + - model + - name + Group: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + readOnly: true + title: Nome + required: + - name + ImportLog: + type: object + properties: + id: + type: integer + readOnly: false + type: + type: string + maxLength: 32 + msg: + type: string + running: + type: boolean + keyword: + allOf: + - $ref: '#/components/schemas/Keyword' + readOnly: true + total_recipes: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + imported_recipes: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + created_by: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - created_by + - keyword + - type + ImportOpenData: + type: object + properties: + selected_version: + type: string + selected_datatypes: + type: array + items: + type: string + update_existing: + type: boolean + default: true + use_metric: + type: boolean + default: true + required: + - selected_datatypes + - selected_version + ImportOpenDataMetaData: + type: object + properties: + versions: + type: array + items: + type: string + datatypes: + type: array + items: + type: string + base: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + cs: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + da: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + de: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + el: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + en: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + es: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + fr: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + hu: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + it: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + nb_NO: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + nl: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + pl: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + pt: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + pt_BR: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + sk: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + sl: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + zh_Hans: + $ref: '#/components/schemas/ImportOpenDataVersionMetaData' + required: + - base + - cs + - da + - datatypes + - de + - el + - en + - es + - fr + - hu + - it + - nb_NO + - nl + - pl + - pt + - pt_BR + - sk + - sl + - versions + - zh_Hans + ImportOpenDataResponse: + type: object + properties: + food: + $ref: '#/components/schemas/ImportOpenDataResponseDetail' + unit: + $ref: '#/components/schemas/ImportOpenDataResponseDetail' + category: + $ref: '#/components/schemas/ImportOpenDataResponseDetail' + property: + $ref: '#/components/schemas/ImportOpenDataResponseDetail' + store: + $ref: '#/components/schemas/ImportOpenDataResponseDetail' + conversion: + $ref: '#/components/schemas/ImportOpenDataResponseDetail' + ImportOpenDataResponseDetail: + type: object + properties: + total_created: + type: integer + default: 0 + total_updated: + type: integer + default: 0 + total_untouched: + type: integer + default: 0 + total_errored: + type: integer + default: 0 + ImportOpenDataVersionMetaData: + type: object + properties: + food: + type: integer + unit: + type: integer + category: + type: integer + property: + type: integer + store: + type: integer + conversion: + type: integer + required: + - category + - conversion + - food + - property + - store + - unit + Ingredient: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + food: + allOf: + - $ref: '#/components/schemas/Food' + nullable: true + unit: + allOf: + - $ref: '#/components/schemas/Unit' + nullable: true + amount: + type: number + format: double + conversions: + type: array + items: {} + readOnly: true + note: + type: string + nullable: true + maxLength: 256 + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + is_header: + type: boolean + no_amount: + type: boolean + original_text: + type: string + nullable: true + maxLength: 512 + used_in_recipes: + type: array + items: {} + readOnly: true + always_use_plural_unit: + type: boolean + always_use_plural_food: + type: boolean + required: + - amount + - conversions + - food + - unit + - used_in_recipes + IngredientString: + type: object + properties: + text: + type: string + required: + - text + InviteLink: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + uuid: + type: string + format: uuid + readOnly: true + email: + type: string + format: email + maxLength: 254 + group: + $ref: '#/components/schemas/Group' + valid_until: + type: string + format: date + used_by: + type: integer + readOnly: true + nullable: true + reusable: + type: boolean + internal_note: + type: string + nullable: true + created_by: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - created_by + - group + - used_by + - uuid + Keyword: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 64 + label: + type: string + readOnly: true + description: + type: string + parent: + type: integer + readOnly: true + numchild: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + full_name: + type: string + description: |- + Returns a string representation of a tree node and it's ancestors, + e.g. 'Cuisine > Asian > Chinese > Catonese'. + readOnly: true + required: + - created_at + - full_name + - label + - name + - numchild + - parent + - updated_at + KeywordLabel: + type: object + properties: + id: + type: integer + readOnly: false + label: + type: string + readOnly: true + required: + - label + Localization: + type: object + properties: + code: + type: string + readOnly: true + maxLength: 8 + language: + type: string + readOnly: true + required: + - code + - language + MealPlan: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + title: + type: string + maxLength: 64 + recipe: + allOf: + - $ref: '#/components/schemas/RecipeOverview' + nullable: true + servings: + type: number + format: double + note: + type: string + note_markdown: + type: string + readOnly: true + from_date: + type: string + format: date-time + to_date: + type: string + format: date-time + meal_type: + $ref: '#/components/schemas/MealType' + created_by: + type: integer + readOnly: true + shared: + type: array + items: + $ref: '#/components/schemas/User' + nullable: true + recipe_name: + type: string + readOnly: true + meal_type_name: + type: string + readOnly: true + shopping: + type: boolean + readOnly: true + addshopping: + type: boolean + writeOnly: true + required: + - created_by + - from_date + - meal_type + - meal_type_name + - note_markdown + - recipe_name + - servings + - shopping + MealType: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + time: + type: string + format: time + nullable: true + color: + type: string + nullable: true + maxLength: 7 + default: + type: boolean + created_by: + type: integer + readOnly: true + required: + - created_by + - name + MethodEnum: + enum: + - DB + - NEXTCLOUD + - LOCAL + type: string + description: |- + * `DB` - Dropbox + * `NEXTCLOUD` - Nextcloud + * `LOCAL` - Local + NutritionInformation: + type: object + properties: + id: + type: integer + readOnly: false + carbohydrates: + type: number + format: double + fats: + type: number + format: double + proteins: + type: number + format: double + calories: + type: number + format: double + source: + type: string + nullable: true + maxLength: 512 + required: + - calories + - carbohydrates + - fats + - proteins + PaginatedAiLogList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AiLog' + timestamp: + type: string + format: date-time + PaginatedAiProviderList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/AiProvider' + timestamp: + type: string + format: date-time + PaginatedAutomationList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Automation' + timestamp: + type: string + format: date-time + PaginatedBookmarkletImportListList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/BookmarkletImportList' + timestamp: + type: string + format: date-time + PaginatedConnectorConfigList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/ConnectorConfig' + timestamp: + type: string + format: date-time + PaginatedCookLogList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/CookLog' + timestamp: + type: string + format: date-time + PaginatedCustomFilterList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/CustomFilter' + timestamp: + type: string + format: date-time + PaginatedExportLogList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/ExportLog' + timestamp: + type: string + format: date-time + PaginatedFoodList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Food' + timestamp: + type: string + format: date-time + PaginatedGenericModelReferenceList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/GenericModelReference' + timestamp: + type: string + format: date-time + PaginatedImportLogList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/ImportLog' + timestamp: + type: string + format: date-time + PaginatedIngredientList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Ingredient' + timestamp: + type: string + format: date-time + PaginatedInviteLinkList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/InviteLink' + timestamp: + type: string + format: date-time + PaginatedKeywordList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Keyword' + timestamp: + type: string + format: date-time + PaginatedMealPlanList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/MealPlan' + timestamp: + type: string + format: date-time + PaginatedMealTypeList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/MealType' + timestamp: + type: string + format: date-time + PaginatedPropertyList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Property' + timestamp: + type: string + format: date-time + PaginatedPropertyTypeList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/PropertyType' + timestamp: + type: string + format: date-time + PaginatedRecipeBookEntryList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/RecipeBookEntry' + timestamp: + type: string + format: date-time + PaginatedRecipeBookList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/RecipeBook' + timestamp: + type: string + format: date-time + PaginatedRecipeImportList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/RecipeImport' + timestamp: + type: string + format: date-time + PaginatedRecipeOverviewList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/RecipeOverview' + PaginatedShoppingListEntryList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/ShoppingListEntry' + timestamp: + type: string + format: date-time + PaginatedShoppingListRecipeList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/ShoppingListRecipe' + timestamp: + type: string + format: date-time + PaginatedSpaceList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Space' + timestamp: + type: string + format: date-time + PaginatedStepList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Step' + timestamp: + type: string + format: date-time + PaginatedStorageList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Storage' + timestamp: + type: string + format: date-time + PaginatedSupermarketCategoryList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/SupermarketCategory' + timestamp: + type: string + format: date-time + PaginatedSupermarketCategoryRelationList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/SupermarketCategoryRelation' + timestamp: + type: string + format: date-time + PaginatedSupermarketList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Supermarket' + timestamp: + type: string + format: date-time + PaginatedSyncList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Sync' + timestamp: + type: string + format: date-time + PaginatedSyncLogList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/SyncLog' + timestamp: + type: string + format: date-time + PaginatedUnitConversionList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/UnitConversion' + timestamp: + type: string + format: date-time + PaginatedUnitList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/Unit' + timestamp: + type: string + format: date-time + PaginatedUserFileList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/UserFile' + timestamp: + type: string + format: date-time + PaginatedUserSpaceList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/UserSpace' + timestamp: + type: string + format: date-time + PaginatedViewLogList: + type: object + required: + - count + - results + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=4 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?page=2 + results: + type: array + items: + $ref: '#/components/schemas/ViewLog' + timestamp: + type: string + format: date-time + ParsedIngredient: + type: object + properties: + amount: + type: integer + unit: + type: string + food: + type: string + note: + type: string + original_text: + type: string + required: + - amount + - food + - note + - original_text + - unit + PatchedAccessToken: + type: object + properties: + id: + type: integer + readOnly: false + token: + type: string + readOnly: true + expires: + type: string + format: date-time + scope: + type: string + created: + type: string + format: date-time + readOnly: true + updated: + type: string + format: date-time + readOnly: true + PatchedAiProvider: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + description: + type: string + api_key: + type: string + writeOnly: true + model_name: + type: string + maxLength: 256 + url: + type: string + nullable: true + maxLength: 2048 + log_credit_cost: + type: boolean + space: + type: integer + nullable: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + PatchedAutomation: + type: object + properties: + id: + type: integer + readOnly: false + type: + $ref: '#/components/schemas/AutomationTypeEnum' + name: + type: string + maxLength: 128 + description: + type: string + nullable: true + param_1: + type: string + nullable: true + maxLength: 128 + param_2: + type: string + nullable: true + maxLength: 128 + param_3: + type: string + nullable: true + maxLength: 128 + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + disabled: + type: boolean + created_by: + type: integer + readOnly: true + PatchedBookmarkletImport: + type: object + properties: + id: + type: integer + readOnly: false + url: + type: string + nullable: true + maxLength: 256 + html: + type: string + created_by: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + PatchedConnectorConfig: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + minLength: 1 + type: + $ref: '#/components/schemas/ConnectorConfigTypeEnum' + url: + type: string + format: uri + nullable: true + maxLength: 200 + token: + type: string + writeOnly: true + nullable: true + maxLength: 512 + todo_entity: + type: string + nullable: true + maxLength: 128 + enabled: + type: boolean + description: Is Connector Enabled + on_shopping_list_entry_created_enabled: + type: boolean + on_shopping_list_entry_updated_enabled: + type: boolean + on_shopping_list_entry_deleted_enabled: + type: boolean + supports_description_field: + type: boolean + description: Does the todo entity support the description field + created_by: + type: integer + readOnly: true + PatchedCookLog: + type: object + properties: + id: + type: integer + readOnly: false + recipe: + type: integer + servings: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + nullable: true + rating: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + nullable: true + comment: + type: string + nullable: true + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + readOnly: true + PatchedCustomFilter: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + search: + type: string + shared: + type: array + items: + $ref: '#/components/schemas/User' + created_by: + type: integer + readOnly: true + PatchedExportLog: + type: object + properties: + id: + type: integer + readOnly: false + type: + type: string + maxLength: 32 + msg: + type: string + running: + type: boolean + total_recipes: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + exported_recipes: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + cache_duration: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + possibly_not_expired: + type: boolean + created_by: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + PatchedFood: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + minLength: 1 + plural_name: + type: string + nullable: true + maxLength: 128 + description: + type: string + shopping: + type: string + readOnly: true + recipe: + allOf: + - $ref: '#/components/schemas/RecipeSimple' + nullable: true + url: + type: string + nullable: true + maxLength: 1024 + properties: + type: array + items: + $ref: '#/components/schemas/Property' + nullable: true + properties_food_amount: + type: number + format: double + properties_food_unit: + allOf: + - $ref: '#/components/schemas/Unit' + nullable: true + fdc_id: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + nullable: true + food_onhand: + type: boolean + nullable: true + supermarket_category: + allOf: + - $ref: '#/components/schemas/SupermarketCategory' + nullable: true + parent: + type: integer + readOnly: true + numchild: + type: integer + readOnly: true + inherit_fields: + type: array + items: + $ref: '#/components/schemas/FoodInheritField' + nullable: true + full_name: + type: string + description: |- + Returns a string representation of a tree node and it's ancestors, + e.g. 'Cuisine > Asian > Chinese > Catonese'. + readOnly: true + ignore_shopping: + type: boolean + substitute: + type: array + items: + $ref: '#/components/schemas/FoodSimple' + nullable: true + substitute_siblings: + type: boolean + substitute_children: + type: boolean + substitute_onhand: + type: boolean + readOnly: true + child_inherit_fields: + type: array + items: + $ref: '#/components/schemas/FoodInheritField' + nullable: true + open_data_slug: + type: string + nullable: true + maxLength: 128 + PatchedImportLog: + type: object + properties: + id: + type: integer + readOnly: false + type: + type: string + maxLength: 32 + msg: + type: string + running: + type: boolean + keyword: + allOf: + - $ref: '#/components/schemas/Keyword' + readOnly: true + total_recipes: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + imported_recipes: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + created_by: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + PatchedIngredient: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + food: + allOf: + - $ref: '#/components/schemas/Food' + nullable: true + unit: + allOf: + - $ref: '#/components/schemas/Unit' + nullable: true + amount: + type: number + format: double + conversions: + type: array + items: {} + readOnly: true + note: + type: string + nullable: true + maxLength: 256 + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + is_header: + type: boolean + no_amount: + type: boolean + original_text: + type: string + nullable: true + maxLength: 512 + used_in_recipes: + type: array + items: {} + readOnly: true + always_use_plural_unit: + type: boolean + always_use_plural_food: + type: boolean + PatchedInviteLink: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + uuid: + type: string + format: uuid + readOnly: true + email: + type: string + format: email + maxLength: 254 + group: + $ref: '#/components/schemas/Group' + valid_until: + type: string + format: date + used_by: + type: integer + readOnly: true + nullable: true + reusable: + type: boolean + internal_note: + type: string + nullable: true + created_by: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + PatchedKeyword: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 64 + label: + type: string + readOnly: true + description: + type: string + parent: + type: integer + readOnly: true + numchild: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + full_name: + type: string + description: |- + Returns a string representation of a tree node and it's ancestors, + e.g. 'Cuisine > Asian > Chinese > Catonese'. + readOnly: true + PatchedMealPlan: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + title: + type: string + maxLength: 64 + recipe: + allOf: + - $ref: '#/components/schemas/RecipeOverview' + nullable: true + servings: + type: number + format: double + note: + type: string + note_markdown: + type: string + readOnly: true + from_date: + type: string + format: date-time + to_date: + type: string + format: date-time + meal_type: + $ref: '#/components/schemas/MealType' + created_by: + type: integer + readOnly: true + shared: + type: array + items: + $ref: '#/components/schemas/User' + nullable: true + recipe_name: + type: string + readOnly: true + meal_type_name: + type: string + readOnly: true + shopping: + type: boolean + readOnly: true + addshopping: + type: boolean + writeOnly: true + PatchedMealType: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + time: + type: string + format: time + nullable: true + color: + type: string + nullable: true + maxLength: 7 + default: + type: boolean + created_by: + type: integer + readOnly: true + PatchedProperty: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + property_amount: + type: number + format: double + nullable: true + property_type: + $ref: '#/components/schemas/PropertyType' + PatchedPropertyType: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + unit: + type: string + nullable: true + maxLength: 64 + description: + type: string + nullable: true + maxLength: 512 + order: + type: integer + default: 0 + open_data_slug: + type: string + nullable: true + maxLength: 128 + fdc_id: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + nullable: true + PatchedRecipe: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + description: + type: string + nullable: true + maxLength: 512 + image: + type: string + format: uri + readOnly: true + nullable: true + keywords: + type: array + items: + $ref: '#/components/schemas/Keyword' + steps: + type: array + items: + $ref: '#/components/schemas/Step' + working_time: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + waiting_time: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + source_url: + type: string + nullable: true + maxLength: 1024 + internal: + type: boolean + show_ingredient_overview: + type: boolean + nutrition: + allOf: + - $ref: '#/components/schemas/NutritionInformation' + nullable: true + properties: + type: array + items: + $ref: '#/components/schemas/Property' + food_properties: + readOnly: true + servings: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + file_path: + type: string + maxLength: 512 + servings_text: + type: string + maxLength: 32 + rating: + type: number + format: double + readOnly: true + nullable: true + last_cooked: + type: string + format: date-time + readOnly: true + nullable: true + private: + type: boolean + shared: + type: array + items: + $ref: '#/components/schemas/User' + PatchedRecipeBook: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + description: + type: string + shared: + type: array + items: + $ref: '#/components/schemas/User' + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + filter: + allOf: + - $ref: '#/components/schemas/CustomFilter' + nullable: true + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + PatchedRecipeBookEntry: + type: object + properties: + id: + type: integer + readOnly: false + book: + type: integer + book_content: + allOf: + - $ref: '#/components/schemas/RecipeBook' + readOnly: true + recipe: + type: integer + recipe_content: + allOf: + - $ref: '#/components/schemas/RecipeOverview' + readOnly: true + PatchedRecipeImport: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + file_uid: + type: string + maxLength: 256 + file_path: + type: string + maxLength: 512 + created_at: + type: string + format: date-time + readOnly: true + storage: + type: integer + space: + type: integer + PatchedSearchPreference: + type: object + description: Adds nested create feature + properties: + user: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + search: + $ref: '#/components/schemas/SearchEnum' + lookup: + type: boolean + unaccent: + type: array + items: + $ref: '#/components/schemas/SearchFields' + nullable: true + icontains: + type: array + items: + $ref: '#/components/schemas/SearchFields' + nullable: true + istartswith: + type: array + items: + $ref: '#/components/schemas/SearchFields' + nullable: true + trigram: + type: array + items: + $ref: '#/components/schemas/SearchFields' + nullable: true + fulltext: + type: array + items: + $ref: '#/components/schemas/SearchFields' + nullable: true + trigram_threshold: + type: number + format: double + maximum: 10 + minimum: -10 + exclusiveMaximum: true + exclusiveMinimum: true + PatchedShoppingListEntry: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + list_recipe: + type: integer + nullable: true + food: + allOf: + - $ref: '#/components/schemas/Food' + nullable: true + unit: + allOf: + - $ref: '#/components/schemas/Unit' + nullable: true + amount: + type: number + format: double + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + checked: + type: boolean + ingredient: + type: integer + nullable: true + list_recipe_data: + allOf: + - $ref: '#/components/schemas/ShoppingListRecipe' + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + completed_at: + type: string + format: date-time + nullable: true + delay_until: + type: string + format: date-time + nullable: true + mealplan_id: + type: integer + writeOnly: true + description: If a mealplan id is given try to find existing or create new + ShoppingListRecipe with that meal plan and link entry to it + PatchedShoppingListRecipe: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 32 + recipe: + type: integer + nullable: true + recipe_data: + allOf: + - $ref: '#/components/schemas/RecipeOverview' + readOnly: true + mealplan: + type: integer + nullable: true + meal_plan_data: + allOf: + - $ref: '#/components/schemas/MealPlan' + readOnly: true + servings: + type: number + format: double + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + PatchedSpace: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + message: + type: string + maxLength: 512 + max_recipes: + type: integer + readOnly: true + max_file_storage_mb: + type: integer + readOnly: true + description: Maximum file storage for space in MB. 0 for unlimited, -1 to + disable file upload. + max_users: + type: integer + readOnly: true + allow_sharing: + type: boolean + readOnly: true + demo: + type: boolean + readOnly: true + food_inherit: + type: array + items: + $ref: '#/components/schemas/FoodInheritField' + user_count: + type: integer + readOnly: true + recipe_count: + type: integer + readOnly: true + file_size_mb: + type: number + format: double + readOnly: true + image: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + nav_logo: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + space_theme: + $ref: '#/components/schemas/SpaceThemeEnum' + custom_space_theme: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + nav_bg_color: + type: string + maxLength: 8 + nav_text_color: + $ref: '#/components/schemas/SpaceNavTextColorEnum' + logo_color_32: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + logo_color_128: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + logo_color_144: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + logo_color_180: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + logo_color_192: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + logo_color_512: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + logo_color_svg: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + ai_credits_monthly: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + ai_credits_balance: + type: number + format: double + maximum: 1000000000000 + minimum: -1000000000000 + exclusiveMaximum: true + exclusiveMinimum: true + ai_monthly_credits_used: + type: integer + readOnly: true + ai_enabled: + type: boolean + ai_default_provider: + allOf: + - $ref: '#/components/schemas/AiProvider' + nullable: true + space_setup_completed: + type: boolean + PatchedStep: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + instruction: + type: string + ingredients: + type: array + items: + $ref: '#/components/schemas/Ingredient' + instructions_markdown: + type: string + readOnly: true + time: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + show_as_header: + type: boolean + file: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + step_recipe: + type: integer + nullable: true + step_recipe_data: + readOnly: true + numrecipe: + type: integer + readOnly: true + show_ingredients_table: + type: boolean + PatchedStorage: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + method: + $ref: '#/components/schemas/MethodEnum' + username: + type: string + nullable: true + maxLength: 128 + password: + type: string + writeOnly: true + nullable: true + maxLength: 128 + token: + type: string + writeOnly: true + nullable: true + maxLength: 4098 + url: + type: string + format: uri + nullable: true + maxLength: 200 + path: + type: string + maxLength: 256 + created_by: + type: integer + readOnly: true + PatchedSupermarket: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + minLength: 1 + description: + type: string + nullable: true + category_to_supermarket: + type: array + items: + $ref: '#/components/schemas/SupermarketCategoryRelation' + readOnly: true + open_data_slug: + type: string + nullable: true + maxLength: 128 + PatchedSupermarketCategory: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + minLength: 1 + description: + type: string + nullable: true + open_data_slug: + type: string + nullable: true + maxLength: 128 + PatchedSupermarketCategoryRelation: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + category: + $ref: '#/components/schemas/SupermarketCategory' + supermarket: + type: integer + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + PatchedSync: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + storage: + $ref: '#/components/schemas/Storage' + path: + type: string + maxLength: 512 + active: + type: boolean + last_checked: + type: string + format: date-time + nullable: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + PatchedUnit: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + minLength: 1 + plural_name: + type: string + nullable: true + maxLength: 128 + description: + type: string + nullable: true + base_unit: + type: string + nullable: true + maxLength: 256 + open_data_slug: + type: string + nullable: true + maxLength: 128 + PatchedUnitConversion: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + readOnly: true + base_amount: + type: number + format: double + base_unit: + $ref: '#/components/schemas/Unit' + converted_amount: + type: number + format: double + converted_unit: + $ref: '#/components/schemas/Unit' + food: + allOf: + - $ref: '#/components/schemas/Food' + nullable: true + open_data_slug: + type: string + nullable: true + maxLength: 128 + PatchedUser: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + username: + type: string + readOnly: true + title: Nome utente + description: Obbligatorio. 150 caratteri o meno.Solo lettere, cifre e @/./+/-/_ + first_name: + type: string + title: Nome + maxLength: 150 + last_name: + type: string + title: Cognome + maxLength: 150 + display_name: + type: string + readOnly: true + is_staff: + type: boolean + readOnly: true + title: Privilegi di staff + description: Stabilisce se l'utente può accedere a questo sito di amministrazione. + is_superuser: + type: boolean + readOnly: true + title: Privilegi di superutente + description: Attribuisce all'utente tutti i privilegi, senza che sia necessario + assegnarli esplicitamente. + is_active: + type: boolean + readOnly: true + title: Attivo + description: Stabilisce se l'utente debba essere considerato attivo. Deseleziona + qui, piuttosto che cancellare gli account. + PatchedUserFile: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + file: + type: string + format: uri + writeOnly: true + file_download: + type: string + readOnly: true + preview: + type: string + readOnly: true + file_size_kb: + type: integer + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + PatchedUserPreference: + type: object + description: Adds nested create feature + properties: + user: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + image: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + theme: + $ref: '#/components/schemas/ThemeEnum' + nav_bg_color: + type: string + maxLength: 8 + nav_text_color: + $ref: '#/components/schemas/UserPreferenceNavTextColorEnum' + nav_show_logo: + type: boolean + default_unit: + type: string + maxLength: 32 + default_page: + $ref: '#/components/schemas/DefaultPageEnum' + use_fractions: + type: boolean + use_kj: + type: boolean + plan_share: + type: array + items: + $ref: '#/components/schemas/User' + nullable: true + nav_sticky: + type: boolean + ingredient_decimals: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + comments: + type: boolean + shopping_auto_sync: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + mealplan_autoadd_shopping: + type: boolean + food_inherit_default: + allOf: + - $ref: '#/components/schemas/FoodInheritField' + readOnly: true + default_delay: + type: number + format: double + maximum: 10000 + minimum: -10000 + exclusiveMaximum: true + exclusiveMinimum: true + mealplan_autoinclude_related: + type: boolean + mealplan_autoexclude_onhand: + type: boolean + shopping_share: + type: array + items: + $ref: '#/components/schemas/User' + nullable: true + shopping_recent_days: + type: integer + maximum: 9223372036854775807 + minimum: 0 + format: int64 + csv_delim: + type: string + maxLength: 2 + csv_prefix: + type: string + maxLength: 10 + filter_to_supermarket: + type: boolean + shopping_add_onhand: + type: boolean + left_handed: + type: boolean + show_step_ingredients: + type: boolean + food_children_exist: + type: boolean + readOnly: true + PatchedUserSpace: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + user: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + space: + type: integer + readOnly: true + groups: + type: array + items: + $ref: '#/components/schemas/Group' + active: + type: boolean + internal_note: + type: string + nullable: true + invite_link: + type: integer + readOnly: true + nullable: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + PatchedViewLog: + type: object + properties: + id: + type: integer + readOnly: false + recipe: + type: integer + created_by: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + Property: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + property_amount: + type: number + format: double + nullable: true + property_type: + $ref: '#/components/schemas/PropertyType' + required: + - property_amount + - property_type + PropertyType: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + unit: + type: string + nullable: true + maxLength: 64 + description: + type: string + nullable: true + maxLength: 512 + order: + type: integer + default: 0 + open_data_slug: + type: string + nullable: true + maxLength: 128 + fdc_id: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + nullable: true + required: + - name + Recipe: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + description: + type: string + nullable: true + maxLength: 512 + image: + type: string + format: uri + readOnly: true + nullable: true + keywords: + type: array + items: + $ref: '#/components/schemas/Keyword' + steps: + type: array + items: + $ref: '#/components/schemas/Step' + working_time: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + waiting_time: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + source_url: + type: string + nullable: true + maxLength: 1024 + internal: + type: boolean + show_ingredient_overview: + type: boolean + nutrition: + allOf: + - $ref: '#/components/schemas/NutritionInformation' + nullable: true + properties: + type: array + items: + $ref: '#/components/schemas/Property' + food_properties: + readOnly: true + servings: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + file_path: + type: string + maxLength: 512 + servings_text: + type: string + maxLength: 32 + rating: + type: number + format: double + readOnly: true + nullable: true + last_cooked: + type: string + format: date-time + readOnly: true + nullable: true + private: + type: boolean + shared: + type: array + items: + $ref: '#/components/schemas/User' + required: + - created_at + - created_by + - food_properties + - image + - last_cooked + - name + - rating + - steps + - updated_at + RecipeBatchUpdate: + type: object + properties: + recipes: + type: array + items: + type: integer + keywords_add: + type: array + items: + type: integer + keywords_remove: + type: array + items: + type: integer + keywords_set: + type: array + items: + type: integer + keywords_remove_all: + type: boolean + default: false + working_time: + type: integer + nullable: true + waiting_time: + type: integer + nullable: true + servings: + type: integer + nullable: true + servings_text: + type: string + nullable: true + private: + type: boolean + nullable: true + shared_add: + type: array + items: + type: integer + shared_remove: + type: array + items: + type: integer + shared_set: + type: array + items: + type: integer + shared_remove_all: + type: boolean + default: false + show_ingredient_overview: + type: boolean + nullable: true + clear_description: + type: boolean + nullable: true + required: + - keywords_add + - keywords_remove + - keywords_set + - recipes + - shared_add + - shared_remove + - shared_set + RecipeBook: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + description: + type: string + shared: + type: array + items: + $ref: '#/components/schemas/User' + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + filter: + allOf: + - $ref: '#/components/schemas/CustomFilter' + nullable: true + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + required: + - created_by + - name + - shared + RecipeBookEntry: + type: object + properties: + id: + type: integer + readOnly: false + book: + type: integer + book_content: + allOf: + - $ref: '#/components/schemas/RecipeBook' + readOnly: true + recipe: + type: integer + recipe_content: + allOf: + - $ref: '#/components/schemas/RecipeOverview' + readOnly: true + required: + - book + - book_content + - recipe + - recipe_content + RecipeFlat: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + readOnly: true + image: + type: string + format: uri + readOnly: true + nullable: true + required: + - image + - name + RecipeFromSource: + type: object + properties: + url: + type: string + nullable: true + maxLength: 4096 + data: + type: string + nullable: true + bookmarklet: + type: integer + nullable: true + RecipeFromSourceResponse: + type: object + properties: + recipe: + $ref: '#/components/schemas/SourceImportRecipe' + recipe_id: + type: integer + images: + type: array + items: + type: string + default: [] + error: + type: boolean + default: false + msg: + type: string + default: '' + maxLength: 1024 + duplicates: + type: array + items: + $ref: '#/components/schemas/SourceImportDuplicate' + default: [] + RecipeImage: + type: object + description: Adds nested create feature + properties: + image: + type: string + format: uri + nullable: true + image_url: + type: string + nullable: true + maxLength: 4096 + RecipeImport: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + file_uid: + type: string + maxLength: 256 + file_path: + type: string + maxLength: 512 + created_at: + type: string + format: date-time + readOnly: true + storage: + type: integer + space: + type: integer + required: + - created_at + - name + - space + - storage + RecipeOverview: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + description: + type: string + nullable: true + maxLength: 512 + image: + type: string + format: uri + readOnly: true + nullable: true + keywords: + type: array + items: + $ref: '#/components/schemas/KeywordLabel' + readOnly: true + working_time: + type: integer + readOnly: true + waiting_time: + type: integer + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + internal: + type: boolean + readOnly: true + private: + type: boolean + servings: + type: integer + readOnly: true + servings_text: + type: string + readOnly: true + rating: + type: number + format: double + readOnly: true + nullable: true + last_cooked: + type: string + format: date-time + readOnly: true + nullable: true + new: + type: boolean + readOnly: true + recent: + type: string + readOnly: true + required: + - created_at + - created_by + - image + - internal + - keywords + - last_cooked + - name + - new + - rating + - recent + - servings + - servings_text + - updated_at + - waiting_time + - working_time + RecipeShoppingUpdate: + type: object + properties: + id: + type: integer + readOnly: false + list_recipe: + type: integer + writeOnly: true + nullable: true + description: Existing shopping list to update + ingredients: + type: array + items: + type: integer + writeOnly: true + nullable: true + description: List of ingredient IDs from the recipe to add, if not provided + all ingredients will be added. + servings: + type: integer + writeOnly: true + nullable: true + default: 1 + description: Providing a list_recipe ID and servings of 0 will delete that + shopping list. + required: + - ingredients + RecipeSimple: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + url: + type: string + readOnly: true + required: + - name + - url + SearchEnum: + enum: + - plain + - phrase + - websearch + - raw + type: string + description: |- + * `plain` - Simple + * `phrase` - Phrase + * `websearch` - Web + * `raw` - Raw + SearchFields: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + nullable: true + field: + type: string + nullable: true + required: [] + SearchPreference: + type: object + description: Adds nested create feature + properties: + user: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + search: + $ref: '#/components/schemas/SearchEnum' + lookup: + type: boolean + unaccent: + type: array + items: + $ref: '#/components/schemas/SearchFields' + nullable: true + icontains: + type: array + items: + $ref: '#/components/schemas/SearchFields' + nullable: true + istartswith: + type: array + items: + $ref: '#/components/schemas/SearchFields' + nullable: true + trigram: + type: array + items: + $ref: '#/components/schemas/SearchFields' + nullable: true + fulltext: + type: array + items: + $ref: '#/components/schemas/SearchFields' + nullable: true + trigram_threshold: + type: number + format: double + maximum: 10 + minimum: -10 + exclusiveMaximum: true + exclusiveMinimum: true + required: + - user + ServerSettings: + type: object + properties: + shopping_min_autosync_interval: + type: string + enable_pdf_export: + type: boolean + disable_external_connectors: + type: boolean + terms_url: + type: string + privacy_url: + type: string + imprint_url: + type: string + hosted: + type: boolean + debug: + type: boolean + version: + type: string + unauthenticated_theme_from_space: + type: integer + force_theme_from_space: + type: integer + logo_color_32: + type: string + format: uri + logo_color_128: + type: string + logo_color_144: + type: string + logo_color_180: + type: string + logo_color_192: + type: string + logo_color_512: + type: string + logo_color_svg: + type: string + custom_space_theme: + type: string + nav_logo: + type: string + nav_bg_color: + type: string + required: + - debug + - disable_external_connectors + - enable_pdf_export + - force_theme_from_space + - hosted + - imprint_url + - privacy_url + - shopping_min_autosync_interval + - terms_url + - unauthenticated_theme_from_space + - version + ShareLink: + type: object + properties: + pk: + type: integer + share: + type: string + format: uuid + link: + type: string + required: + - link + - pk + - share + ShoppingListEntry: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + list_recipe: + type: integer + nullable: true + food: + allOf: + - $ref: '#/components/schemas/Food' + nullable: true + unit: + allOf: + - $ref: '#/components/schemas/Unit' + nullable: true + amount: + type: number + format: double + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + checked: + type: boolean + ingredient: + type: integer + nullable: true + list_recipe_data: + allOf: + - $ref: '#/components/schemas/ShoppingListRecipe' + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + completed_at: + type: string + format: date-time + nullable: true + delay_until: + type: string + format: date-time + nullable: true + mealplan_id: + type: integer + writeOnly: true + description: If a mealplan id is given try to find existing or create new + ShoppingListRecipe with that meal plan and link entry to it + required: + - amount + - created_at + - created_by + - food + - list_recipe_data + - updated_at + ShoppingListEntryBulk: + type: object + properties: + ids: + type: array + items: {} + checked: + type: boolean + timestamp: + type: string + format: date-time + readOnly: true + required: + - checked + - ids + - timestamp + ShoppingListEntryBulkCreate: + type: object + properties: + entries: + type: array + items: + $ref: '#/components/schemas/ShoppingListEntrySimpleCreate' + required: + - entries + ShoppingListEntrySimpleCreate: + type: object + properties: + amount: + type: number + format: double + unit_id: + type: integer + nullable: true + food_id: + type: integer + nullable: true + ingredient_id: + type: integer + nullable: true + required: + - amount + - food_id + - ingredient_id + - unit_id + ShoppingListRecipe: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 32 + recipe: + type: integer + nullable: true + recipe_data: + allOf: + - $ref: '#/components/schemas/RecipeOverview' + readOnly: true + mealplan: + type: integer + nullable: true + meal_plan_data: + allOf: + - $ref: '#/components/schemas/MealPlan' + readOnly: true + servings: + type: number + format: double + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + required: + - created_by + - meal_plan_data + - recipe_data + - servings + SourceImportDuplicate: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + required: + - name + SourceImportFood: + type: object + properties: + name: + type: string + required: + - name + SourceImportIngredient: + type: object + properties: + amount: + type: number + format: double + food: + $ref: '#/components/schemas/SourceImportFood' + unit: + $ref: '#/components/schemas/SourceImportUnit' + note: + type: string + original_text: + type: string + required: + - amount + - food + - original_text + - unit + SourceImportKeyword: + type: object + properties: + id: + type: integer + nullable: true + readOnly: false + label: + type: string + name: + type: string + import_keyword: + type: boolean + default: true + required: + - label + - name + SourceImportProperty: + type: object + properties: + property_type: + $ref: '#/components/schemas/SourceImportPropertyType' + property_amount: + type: number + format: double + required: + - property_amount + - property_type + SourceImportPropertyType: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + required: + - name + SourceImportRecipe: + type: object + properties: + steps: + type: array + items: + $ref: '#/components/schemas/SourceImportStep' + internal: + type: boolean + default: true + source_url: + type: string + format: uri + name: + type: string + description: + type: string + servings: + type: integer + default: 1 + servings_text: + type: string + default: '' + working_time: + type: integer + default: 0 + waiting_time: + type: integer + default: 0 + image_url: + type: string + format: uri + keywords: + type: array + items: + $ref: '#/components/schemas/SourceImportKeyword' + default: [] + properties: + type: array + items: + $ref: '#/components/schemas/SourceImportProperty' + default: [] + required: + - name + - source_url + - steps + SourceImportStep: + type: object + properties: + instruction: + type: string + ingredients: + type: array + items: + $ref: '#/components/schemas/SourceImportIngredient' + show_ingredients_table: + type: boolean + default: true + required: + - ingredients + - instruction + SourceImportUnit: + type: object + properties: + name: + type: string + required: + - name + Space: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + message: + type: string + maxLength: 512 + max_recipes: + type: integer + readOnly: true + max_file_storage_mb: + type: integer + readOnly: true + description: Maximum file storage for space in MB. 0 for unlimited, -1 to + disable file upload. + max_users: + type: integer + readOnly: true + allow_sharing: + type: boolean + readOnly: true + demo: + type: boolean + readOnly: true + food_inherit: + type: array + items: + $ref: '#/components/schemas/FoodInheritField' + user_count: + type: integer + readOnly: true + recipe_count: + type: integer + readOnly: true + file_size_mb: + type: number + format: double + readOnly: true + image: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + nav_logo: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + space_theme: + $ref: '#/components/schemas/SpaceThemeEnum' + custom_space_theme: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + nav_bg_color: + type: string + maxLength: 8 + nav_text_color: + $ref: '#/components/schemas/SpaceNavTextColorEnum' + logo_color_32: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + logo_color_128: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + logo_color_144: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + logo_color_180: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + logo_color_192: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + logo_color_512: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + logo_color_svg: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + ai_credits_monthly: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + ai_credits_balance: + type: number + format: double + maximum: 1000000000000 + minimum: -1000000000000 + exclusiveMaximum: true + exclusiveMinimum: true + ai_monthly_credits_used: + type: integer + readOnly: true + ai_enabled: + type: boolean + ai_default_provider: + allOf: + - $ref: '#/components/schemas/AiProvider' + nullable: true + space_setup_completed: + type: boolean + required: + - ai_monthly_credits_used + - allow_sharing + - created_at + - created_by + - demo + - file_size_mb + - max_file_storage_mb + - max_recipes + - max_users + - recipe_count + - user_count + SpaceNavTextColorEnum: + enum: + - BLANK + - LIGHT + - DARK + type: string + description: |- + * `BLANK` - ------- + * `LIGHT` - Light + * `DARK` - Dark + SpaceThemeEnum: + enum: + - BLANK + - TANDOOR + - BOOTSTRAP + - DARKLY + - FLATLY + - SUPERHERO + - TANDOOR_DARK + type: string + description: |- + * `BLANK` - ------- + * `TANDOOR` - Tandoor + * `BOOTSTRAP` - Bootstrap + * `DARKLY` - Darkly + * `FLATLY` - Flatly + * `SUPERHERO` - Superhero + * `TANDOOR_DARK` - Tandoor Dark (INCOMPLETE) + Step: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + instruction: + type: string + ingredients: + type: array + items: + $ref: '#/components/schemas/Ingredient' + instructions_markdown: + type: string + readOnly: true + time: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + show_as_header: + type: boolean + file: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + step_recipe: + type: integer + nullable: true + step_recipe_data: + readOnly: true + numrecipe: + type: integer + readOnly: true + show_ingredients_table: + type: boolean + required: + - ingredients + - instructions_markdown + - numrecipe + - step_recipe_data + Storage: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + method: + $ref: '#/components/schemas/MethodEnum' + username: + type: string + nullable: true + maxLength: 128 + password: + type: string + writeOnly: true + nullable: true + maxLength: 128 + token: + type: string + writeOnly: true + nullable: true + maxLength: 4098 + url: + type: string + format: uri + nullable: true + maxLength: 200 + path: + type: string + maxLength: 256 + created_by: + type: integer + readOnly: true + required: + - created_by + - name + Supermarket: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + minLength: 1 + description: + type: string + nullable: true + category_to_supermarket: + type: array + items: + $ref: '#/components/schemas/SupermarketCategoryRelation' + readOnly: true + open_data_slug: + type: string + nullable: true + maxLength: 128 + required: + - category_to_supermarket + - name + SupermarketCategory: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + minLength: 1 + description: + type: string + nullable: true + open_data_slug: + type: string + nullable: true + maxLength: 128 + required: + - name + SupermarketCategoryRelation: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + category: + $ref: '#/components/schemas/SupermarketCategory' + supermarket: + type: integer + order: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + required: + - category + - supermarket + Sync: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + storage: + $ref: '#/components/schemas/Storage' + path: + type: string + maxLength: 512 + active: + type: boolean + last_checked: + type: string + format: date-time + nullable: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - storage + - updated_at + SyncLog: + type: object + properties: + id: + type: integer + readOnly: false + sync: + allOf: + - $ref: '#/components/schemas/Sync' + readOnly: true + status: + type: string + maxLength: 32 + msg: + type: string + created_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - status + - sync + ThemeEnum: + enum: + - TANDOOR + - BOOTSTRAP + - DARKLY + - FLATLY + - SUPERHERO + - TANDOOR_DARK + type: string + description: |- + * `TANDOOR` - Tandoor + * `BOOTSTRAP` - Bootstrap + * `DARKLY` - Darkly + * `FLATLY` - Flatly + * `SUPERHERO` - Superhero + * `TANDOOR_DARK` - Tandoor Dark (INCOMPLETE) + Unit: + type: object + description: |- + Moves `UniqueValidator`'s from the validation stage to the save stage. + It solves the problem with nested validation for unique fields on update. + + If you want more details, you can read related issues and articles: + https://github.com/beda-software/drf-writable-nested/issues/1 + http://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers + + Example of usage: + ``` + class Child(models.Model): + field = models.CharField(unique=True) + + + class Parent(models.Model): + child = models.ForeignKey('Child') + + + class ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer): + class Meta: + model = Child + + + class ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer): + child = ChildSerializer() + + class Meta: + model = Parent + ``` + + Note: `UniqueFieldsMixin` must be applied only on the serializer + which has unique fields. + + Note: When you are using both mixins + (`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`) + you should put `UniqueFieldsMixin` ahead. + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + minLength: 1 + plural_name: + type: string + nullable: true + maxLength: 128 + description: + type: string + nullable: true + base_unit: + type: string + nullable: true + maxLength: 256 + open_data_slug: + type: string + nullable: true + maxLength: 128 + required: + - name + UnitConversion: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + name: + type: string + readOnly: true + base_amount: + type: number + format: double + base_unit: + $ref: '#/components/schemas/Unit' + converted_amount: + type: number + format: double + converted_unit: + $ref: '#/components/schemas/Unit' + food: + allOf: + - $ref: '#/components/schemas/Food' + nullable: true + open_data_slug: + type: string + nullable: true + maxLength: 128 + required: + - base_amount + - base_unit + - converted_amount + - converted_unit + - name + User: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + username: + type: string + readOnly: true + title: Nome utente + description: Obbligatorio. 150 caratteri o meno.Solo lettere, cifre e @/./+/-/_ + first_name: + type: string + title: Nome + maxLength: 150 + last_name: + type: string + title: Cognome + maxLength: 150 + display_name: + type: string + readOnly: true + is_staff: + type: boolean + readOnly: true + title: Privilegi di staff + description: Stabilisce se l'utente può accedere a questo sito di amministrazione. + is_superuser: + type: boolean + readOnly: true + title: Privilegi di superutente + description: Attribuisce all'utente tutti i privilegi, senza che sia necessario + assegnarli esplicitamente. + is_active: + type: boolean + readOnly: true + title: Attivo + description: Stabilisce se l'utente debba essere considerato attivo. Deseleziona + qui, piuttosto che cancellare gli account. + required: + - display_name + - is_active + - is_staff + - is_superuser + - username + UserFile: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + file: + type: string + format: uri + writeOnly: true + file_download: + type: string + readOnly: true + preview: + type: string + readOnly: true + file_size_kb: + type: integer + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - created_by + - file_download + - file_size_kb + - name + - preview + UserFileView: + type: object + properties: + id: + type: integer + readOnly: false + name: + type: string + maxLength: 128 + file_download: + type: string + readOnly: true + preview: + type: string + readOnly: true + file_size_kb: + type: integer + readOnly: true + created_by: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - created_by + - file_download + - file_size_kb + - name + - preview + UserPreference: + type: object + description: Adds nested create feature + properties: + user: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + image: + allOf: + - $ref: '#/components/schemas/UserFileView' + nullable: true + theme: + $ref: '#/components/schemas/ThemeEnum' + nav_bg_color: + type: string + maxLength: 8 + nav_text_color: + $ref: '#/components/schemas/UserPreferenceNavTextColorEnum' + nav_show_logo: + type: boolean + default_unit: + type: string + maxLength: 32 + default_page: + $ref: '#/components/schemas/DefaultPageEnum' + use_fractions: + type: boolean + use_kj: + type: boolean + plan_share: + type: array + items: + $ref: '#/components/schemas/User' + nullable: true + nav_sticky: + type: boolean + ingredient_decimals: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + comments: + type: boolean + shopping_auto_sync: + type: integer + maximum: 9223372036854775807 + minimum: -9223372036854775808 + format: int64 + mealplan_autoadd_shopping: + type: boolean + food_inherit_default: + allOf: + - $ref: '#/components/schemas/FoodInheritField' + readOnly: true + default_delay: + type: number + format: double + maximum: 10000 + minimum: -10000 + exclusiveMaximum: true + exclusiveMinimum: true + mealplan_autoinclude_related: + type: boolean + mealplan_autoexclude_onhand: + type: boolean + shopping_share: + type: array + items: + $ref: '#/components/schemas/User' + nullable: true + shopping_recent_days: + type: integer + maximum: 9223372036854775807 + minimum: 0 + format: int64 + csv_delim: + type: string + maxLength: 2 + csv_prefix: + type: string + maxLength: 10 + filter_to_supermarket: + type: boolean + shopping_add_onhand: + type: boolean + left_handed: + type: boolean + show_step_ingredients: + type: boolean + food_children_exist: + type: boolean + readOnly: true + required: + - food_children_exist + - food_inherit_default + - user + UserPreferenceNavTextColorEnum: + enum: + - LIGHT + - DARK + type: string + description: |- + * `LIGHT` - Light + * `DARK` - Dark + UserSpace: + type: object + description: Adds nested create feature + properties: + id: + type: integer + readOnly: false + user: + allOf: + - $ref: '#/components/schemas/User' + readOnly: true + space: + type: integer + readOnly: true + groups: + type: array + items: + $ref: '#/components/schemas/Group' + active: + type: boolean + internal_note: + type: string + nullable: true + invite_link: + type: integer + readOnly: true + nullable: true + created_at: + type: string + format: date-time + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - groups + - invite_link + - space + - updated_at + - user + ViewLog: + type: object + properties: + id: + type: integer + readOnly: false + recipe: + type: integer + created_by: + type: integer + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + required: + - created_at + - created_by + - recipe + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: Authorization diff --git a/docs/plans/FixTandoorImageUploadV2.md b/docs/plans/FixTandoorImageUploadV2.md new file mode 100644 index 0000000..c2de20e --- /dev/null +++ b/docs/plans/FixTandoorImageUploadV2.md @@ -0,0 +1,485 @@ +# Execution Plan: Fix Tandoor Image Upload (v2) + +**Date:** 2025-12-21 +**Author:** Analyst Agent +**Status:** Draft +**Issue:** URL pass-through fails with 500, file upload fails with 400 "Upload a valid image" + +## Problem Statement + +Thumbnail upload to Tandoor is failing with two distinct errors: + +``` +[Tandoor Upload] Using URL pass-through strategy +[Tandoor Upload] URL pass-through failed (500), trying file upload + +[Tandoor Upload] Using fallback fetch strategy +[Tandoor Upload] Failed: 400 Bad Request +[Tandoor Upload] Response: {"image":["Upload a valid image. The file you uploaded was either not an image or a corrupted image."]} +``` + +## Root Cause Analysis + +### Issue 1: URL Pass-through Fails (500 Error) + +**Current Implementation:** +```typescript +formData.append('image_url', imageUrl); +``` + +**Problem:** The OpenAPI spec shows that `RecipeImage` schema has two fields: +- `image`: `type: string, format: uri` (for file upload) +- `image_url`: `type: string, maxLength: 4096` (for URL) + +However, the **500 error** suggests Tandoor might not support `image_url` field in this version, or it's encountering an error when trying to fetch the URL server-side. + +### Issue 2: File Upload Fails (400 Error) + +**Current Implementation:** +```typescript +const blob = new Blob([imageBuffer], { type: parsed.mimeType }); +formData.append('image', blob, `recipe-image${extension}`); +``` + +**Problem:** According to OpenAPI spec: +```yaml +requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeImage' +``` + +The `image` field expects `format: uri` which in multipart context means an **actual file with proper headers**. Our current Blob might be missing critical multipart headers or the blob isn't being properly recognized as a file. + +**Root Cause:** In Node.js/server-side context, `Blob` API might not work the same as in browser. We need to use proper Node.js file handling or ensure the Blob is correctly formatted for multipart upload. + +## Analysis from OpenAPI Spec + +### Endpoint Definition +```yaml +/api/recipe/{id}/image/: + put: + operationId: apiRecipeImageUpdate + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/RecipeImage' +``` + +### RecipeImage Schema +```yaml +RecipeImage: + type: object + properties: + image: + type: string + format: uri + nullable: true + image_url: + type: string + nullable: true + maxLength: 4096 +``` + +### Key Insights + +1. **Both fields are optional** (`nullable: true`) +2. **`image_url` exists** but may not be working (500 error suggests server-side issue) +3. **`image` expects file upload** via multipart/form-data +4. **No Content-Type header** should be set manually (let browser/Node set it for multipart) + +## Proposed Solution + +### Strategy Change + +Since `image_url` is causing 500 errors (Tandoor server can't fetch or process the URL), we should: + +1. **Always download and upload the image** (more reliable) +2. **Fix the file upload format** to ensure proper multipart headers +3. **Remove URL pass-through** (or make it optional/fallback) + +### Technical Fix Required + +The issue is that in **server-side Node.js context** (SvelteKit server), the `Blob` API doesn't create proper multipart form data. We need to: + +1. Use `File` constructor with proper filename and type +2. Or use `Buffer` with proper form-data library +3. Ensure proper MIME type is set +4. Let FormData handle Content-Type header (don't set it manually) + +## Implementation Plan + +### Story 1: Fix File Upload for Direct URLs + +**Objective:** Make direct URL images download and upload correctly + +**Current Problem:** +```typescript +const response = await fetch(imageUrl); +const imageBlob = await response.blob(); +formData.append('image', imageBlob, `recipe-image${extension}`); +// Fails with 400: "Upload a valid image" +``` + +**Solution:** + +In SvelteKit server environment, we need to handle this differently: + +```typescript +// Download the image +const response = await fetch(imageUrl); +const arrayBuffer = await response.arrayBuffer(); +const buffer = Buffer.from(arrayBuffer); + +// Get proper MIME type +const mimeType = response.headers.get('content-type') || 'image/jpeg'; +const extension = getExtensionFromMimeType(mimeType); + +// Create a proper File object (if available) or use Blob correctly +const blob = new Blob([buffer], { type: mimeType }); +const file = new File([blob], `recipe-image${extension}`, { type: mimeType }); + +const formData = new FormData(); +formData.append('image', file); +``` + +**Acceptance Criteria:** +- Direct URL images (from meta tags) upload successfully +- No 400 "Upload a valid image" errors +- Proper MIME type detected from response headers +- File has correct extension and name + +--- + +### Story 2: Fix Base64 Data URL Upload + +**Objective:** Make base64 screenshot images upload correctly + +**Current Problem:** +```typescript +const imageBuffer = Buffer.from(parsed.base64Data, 'base64'); +const blob = new Blob([imageBuffer], { type: parsed.mimeType }); +formData.append('image', blob, `recipe-image${extension}`); +// Fails with 400: "Upload a valid image" +``` + +**Solution:** + +```typescript +// Parse base64 data URL +const parsed = parseDataUrl(imageUrl); +const imageBuffer = Buffer.from(parsed.base64Data, 'base64'); +const extension = getExtensionFromMimeType(parsed.mimeType); + +// Create proper File object +const blob = new Blob([imageBuffer], { type: parsed.mimeType }); +const file = new File([blob], `recipe-image${extension}`, { type: parsed.mimeType }); + +const formData = new FormData(); +formData.append('image', file); +``` + +**Key Change:** Use `File` constructor instead of just `Blob` + +**Acceptance Criteria:** +- Base64 images (screenshots) upload successfully +- Proper MIME type from data URL is preserved +- File has correct extension + +--- + +### Story 3: Remove or Fix URL Pass-through Strategy + +**Objective:** Handle the 500 error from `image_url` field + +**Options:** + +**Option A: Remove URL Pass-through** +- Always download and upload images +- More reliable, works around Tandoor server issue +- Slightly more bandwidth usage + +**Option B: Make URL Pass-through Optional** +- Try `image_url` first +- On 500 error, fall back to file upload immediately +- Keep current behavior but with better error handling + +**Recommendation:** **Option A** - Remove URL pass-through for now since: +1. It's causing 500 errors +2. File upload is more reliable +3. Performance difference is minimal +4. Simpler code (one path instead of multiple fallbacks) + +**If keeping URL pass-through**, improve error handling: +```typescript +// Try URL pass-through +const urlResult = await tryUrlPassthrough(recipeId, imageUrl, token); +if (urlResult.success) { + return urlResult; +} + +// On ANY error (500, 400, etc.), fall back to file upload +console.warn(`URL pass-through failed (${urlResult.status}), using file upload`); +return uploadAsFile(recipeId, imageUrl, token); +``` + +**Acceptance Criteria:** +- No 500 errors in logs +- Clear decision: either URL pass-through works or it's removed +- Fallback to file upload is automatic + +--- + +### Story 4: Ensure Proper FormData Headers + +**Objective:** Let FormData handle Content-Type automatically + +**Current Problem:** +We might be setting headers that conflict with multipart boundaries. + +**Solution:** + +```typescript +// DON'T set Content-Type manually for multipart uploads +const uploadResponse = await fetch( + `${tandoorConfig.serverUrl}/api/recipe/${recipeId}/image/`, + { + method: 'PUT', + headers: { + 'Authorization': `Bearer ${token}` + // NO Content-Type header - let FormData set it + }, + body: formData + } +); +``` + +**Key Point:** FormData automatically sets `Content-Type: multipart/form-data; boundary=...` and we must not override it. + +**Acceptance Criteria:** +- No manual Content-Type header for image upload +- FormData handles multipart boundaries automatically +- Upload succeeds with proper headers + +--- + +### Story 5: Add Comprehensive Error Logging + +**Objective:** Better debugging for future issues + +**Changes:** + +```typescript +// Log request details +console.log(`[Tandoor Upload] Recipe ID: ${recipeId}`); +console.log(`[Tandoor Upload] Image source: ${imageUrl.substring(0, 100)}`); +console.log(`[Tandoor Upload] MIME type: ${mimeType}`); +console.log(`[Tandoor Upload] File size: ${buffer.length} bytes`); + +// Log response details +if (!uploadResponse.ok) { + const responseText = await uploadResponse.text(); + console.error(`[Tandoor Upload] Failed: ${uploadResponse.status}`); + console.error(`[Tandoor Upload] Response headers:`, uploadResponse.headers); + console.error(`[Tandoor Upload] Response body:`, responseText); +} +``` + +**Acceptance Criteria:** +- Response headers logged on error +- File metadata logged (size, type) +- Clear distinction between different error types + +--- + +## Testing Strategy + +### Test Case 1: Direct URL Image +```typescript +const imageUrl = 'https://www.giallozafferano.it/images/recipe_images/1087263_calamari-e-patate.jpg'; +const result = await uploadRecipeImage(1, imageUrl); +// Expected: success: true +// Expected logs: File size, MIME type, success message +``` + +### Test Case 2: Base64 Screenshot +```typescript +const base64Url = 'data:image/jpeg;base64,/9j/4AAQSkZJRg...'; +const result = await uploadRecipeImage(1, base64Url); +// Expected: success: true +// Expected logs: Detected base64, converted to file, success +``` + +### Test Case 3: Error Handling +```typescript +const invalidUrl = 'https://invalid.url/image.jpg'; +const result = await uploadRecipeImage(1, invalidUrl); +// Expected: success: false, error message with details +``` + +--- + +## Code Example + +### Complete Fixed Implementation + +```typescript +export async function uploadRecipeImage( + recipeId: number, + imageUrl: string +): Promise<{ success: boolean; error?: string }> { + try { + const token = tandoorConfig.token; + if (!token) { + return { success: false, error: 'TANDOOR_TOKEN not set' }; + } + + console.log(`[Tandoor Upload] Recipe ID: ${recipeId}`); + console.log(`[Tandoor Upload] Image source: ${imageUrl.substring(0, 100)}...`); + + let buffer: Buffer; + let mimeType: string; + let extension: string; + + // Handle base64 data URL + if (isDataUrl(imageUrl)) { + console.log('[Tandoor Upload] Processing base64 data URL'); + const parsed = parseDataUrl(imageUrl); + if (!parsed) { + return { success: false, error: 'Invalid data URL format' }; + } + buffer = Buffer.from(parsed.base64Data, 'base64'); + mimeType = parsed.mimeType; + extension = getExtensionFromMimeType(mimeType); + } + // Handle direct URL + else if (isDirectUrl(imageUrl)) { + console.log('[Tandoor Upload] Downloading from URL'); + const response = await fetch(imageUrl); + if (!response.ok) { + return { success: false, error: `Failed to fetch image: ${response.statusText}` }; + } + const arrayBuffer = await response.arrayBuffer(); + buffer = Buffer.from(arrayBuffer); + mimeType = response.headers.get('content-type') || 'image/jpeg'; + extension = getExtensionFromMimeType(mimeType); + } + else { + return { success: false, error: 'Invalid image URL format' }; + } + + console.log(`[Tandoor Upload] MIME type: ${mimeType}`); + console.log(`[Tandoor Upload] File size: ${buffer.length} bytes`); + console.log(`[Tandoor Upload] Extension: ${extension}`); + + // Create proper File object for multipart upload + const blob = new Blob([buffer], { type: mimeType }); + const file = new File([blob], `recipe-image${extension}`, { type: mimeType }); + + const formData = new FormData(); + formData.append('image', file); + + // Upload to Tandoor + const uploadResponse = await fetch( + `${tandoorConfig.serverUrl}/api/recipe/${recipeId}/image/`, + { + method: 'PUT', + headers: { + 'Authorization': `Bearer ${token}` + // No Content-Type - let FormData set it + }, + body: formData + } + ); + + if (!uploadResponse.ok) { + const errorText = await uploadResponse.text(); + console.error(`[Tandoor Upload] Failed: ${uploadResponse.status} ${uploadResponse.statusText}`); + console.error(`[Tandoor Upload] Response:`, errorText.substring(0, 500)); + return { + success: false, + error: `Upload failed (${uploadResponse.status}): ${errorText.substring(0, 200)}` + }; + } + + console.log(`[Tandoor Upload] ✓ Success - ${buffer.length} bytes uploaded`); + return { success: true }; + + } catch (error) { + const errorMsg = error instanceof Error ? error.message : 'Unknown error'; + console.error(`[Tandoor Upload] Exception:`, error); + return { success: false, error: errorMsg }; + } +} +``` + +--- + +## Key Differences from Previous Implementation + +| Aspect | Previous | New | +|--------|----------|-----| +| URL Handling | URL pass-through first, then fallback | Always download and upload | +| Blob Creation | `new Blob()` only | `new Blob()` + `new File()` | +| MIME Type Source | Extension guessing | Actual HTTP headers or data URL | +| Error Handling | Multiple strategies with fallbacks | Single reliable path | +| Headers | May set Content-Type | Never set Content-Type for multipart | + +--- + +## Success Metrics + +✅ **Primary Goal:** +- Images upload successfully to Tandoor without 400 or 500 errors + +✅ **Code Quality:** +- Single, reliable upload path +- Proper File object creation +- Clear error messages with response details + +✅ **Performance:** +- Minimal overhead from download +- No unnecessary retry attempts +- Fast failure with clear errors + +--- + +## Rollback Plan + +If the fix doesn't work: + +1. Add detailed logging at each step +2. Test with curl to verify multipart format: +```bash +curl -X PUT \ + -H "Authorization: Bearer ${TOKEN}" \ + -F "image=@test-image.jpg" \ + ${TANDOOR_URL}/api/recipe/1/image/ +``` +3. Compare working curl request with our FormData +4. Investigate if SvelteKit/Node.js FormData implementation differs from browser + +--- + +## Dependencies + +- Node.js `Buffer` API +- Fetch API (built-in) +- FormData API (built-in) +- Blob/File constructors (built-in) + +--- + +## References + +- Tandoor OpenAPI Spec: `docs/Tandoor (2.3.6).yaml` +- Endpoint: `PUT /api/recipe/{id}/image/` +- Schema: `RecipeImage` (lines 13992-14005) +- Endpoint definition (lines 5712-5738) + +--- + +**Plan Status:** ✅ Ready for Implementation +**Next Step:** Use `@dev FixTandoorImageUploadV2` to execute this plan diff --git a/secrets/auth.json b/secrets/auth.json index 130a024..272b0fd 100644 --- a/secrets/auth.json +++ b/secrets/auth.json @@ -5,7 +5,7 @@ "value": "SDRORLyWEsWWty2ZoVGdER", "domain": ".instagram.com", "path": "/", - "expires": 1800849269.656302, + "expires": 1800850168.116943, "httpOnly": false, "secure": true, "sameSite": "Lax" @@ -45,7 +45,7 @@ "value": "59661903731", "domain": ".instagram.com", "path": "/", - "expires": 1774065269.656394, + "expires": 1774066168.117026, "httpOnly": false, "secure": true, "sameSite": "None" @@ -72,7 +72,7 @@ }, { "name": "rur", - "value": "\"CLN\\05459661903731\\0541797825269:01fe6904bc7d85ccbfea5233062783089ac963caf6202742eb0b112bd5ab4f6ef965e2f4\"", + "value": "\"CLN\\05459661903731\\0541797826168:01fe0c70391c9f4322366f6ea648ca6647818cd2ca16c215419a55558746287e2865245d\"", "domain": ".instagram.com", "path": "/", "expires": -1, @@ -87,7 +87,7 @@ "localStorage": [ { "name": "chatd-deviceid", - "value": "11f6cbef-22a3-4c0b-9558-7a83fd40e521" + "value": "0265e9b3-0083-498a-9424-7a08289dfb45" }, { "name": "hb_timestamp", @@ -95,7 +95,7 @@ }, { "name": "IGSession", - "value": "6m2tlb:1766291070793" + "value": "6m2tlb:1766291968512" }, { "name": "pixel_fire_ts", @@ -107,7 +107,7 @@ }, { "name": "Session", - "value": "0f4qnx:1766289305793" + "value": "nrg3hr:1766290203512" }, { "name": "has_interop_upgraded", diff --git a/src/lib/server/tandoor.ts b/src/lib/server/tandoor.ts index a9b4bb7..9ef7118 100644 --- a/src/lib/server/tandoor.ts +++ b/src/lib/server/tandoor.ts @@ -372,15 +372,17 @@ function getExtensionFromMimeType(mimeType: string): string { } /** - * Uploads an image to a Tandoor recipe with intelligent format handling + * Uploads an image to a Tandoor recipe using proper multipart/form-data format * - * Supports three upload strategies: - * 1. Direct URL pass-through (most efficient) - for meta tags, Instagram URLs - * 2. Base64 data URL conversion to file upload - for screenshots - * 3. Fallback blob upload - for any other format + * Always downloads the image and uploads as a File object (not Blob). + * This ensures proper multipart encoding with filename and MIME type metadata. + * + * Handles two source formats: + * - Direct HTTP(S) URLs: Downloads from URL, detects MIME from response headers + * - Base64 data URLs: Decodes base64, uses embedded MIME type * * @param recipeId - Tandoor recipe ID - * @param imageUrl - Image URL (can be HTTP(S) URL or base64 data URL) + * @param imageUrl - Image URL (HTTP(S) URL or base64 data URL) * @returns Success status and optional error message */ export async function uploadRecipeImage( @@ -397,111 +399,102 @@ export async function uploadRecipeImage( console.log(`[Tandoor Upload] Image type: ${isDirectUrl(imageUrl) ? 'URL' : isDataUrl(imageUrl) ? 'Base64' : 'Unknown'}`); console.log(`[Tandoor Upload] Image source: ${imageUrl.substring(0, 100)}...`); - // Strategy 1: Direct URL pass-through (preferred) - if (isDirectUrl(imageUrl)) { - console.log('[Tandoor Upload] Using URL pass-through strategy'); - const formData = new FormData(); - formData.append('image_url', imageUrl); + let buffer: Buffer; + let mimeType: string; + let sourceType: string; - const uploadResponse = await fetch( - `${tandoorConfig.serverUrl}/api/recipe/${recipeId}/image/`, - { - method: 'PUT', - headers: { 'Authorization': `Bearer ${token}` }, - body: formData - } - ); - - if (uploadResponse.ok) { - console.log('[Tandoor Upload] ✓ Success via URL pass-through'); - return { success: true }; - } - - // If URL strategy fails, fall through to file upload - const errorText = await uploadResponse.text().catch(() => uploadResponse.statusText); - console.warn(`[Tandoor Upload] URL pass-through failed (${uploadResponse.status}), trying file upload: ${errorText}`); - } - - // Strategy 2: Base64 data URL to file upload + // Handle base64 data URLs if (isDataUrl(imageUrl)) { - console.log('[Tandoor Upload] Using base64 file upload strategy'); + sourceType = 'base64'; + console.log('[Tandoor Upload] Decoding base64 data URL'); const parsed = parseDataUrl(imageUrl); if (!parsed) { return { success: false, error: 'Invalid data URL format' }; } - // Convert base64 to buffer - const imageBuffer = Buffer.from(parsed.base64Data, 'base64'); - const extension = getExtensionFromMimeType(parsed.mimeType); + buffer = Buffer.from(parsed.base64Data, 'base64'); + mimeType = parsed.mimeType; + console.log(`[Tandoor Upload] Decoded ${buffer.length} bytes, MIME: ${mimeType}`); + } + // Handle direct HTTP(S) URLs + else if (isDirectUrl(imageUrl)) { + sourceType = 'url'; + console.log('[Tandoor Upload] Downloading image from URL'); - // Create a proper file blob - const blob = new Blob([imageBuffer], { type: parsed.mimeType }); - - const formData = new FormData(); - formData.append('image', blob, `recipe-image${extension}`); - - const uploadResponse = await fetch( - `${tandoorConfig.serverUrl}/api/recipe/${recipeId}/image/`, - { - method: 'PUT', - headers: { 'Authorization': `Bearer ${token}` }, - body: formData - } - ); - - if (!uploadResponse.ok) { - const errorText = await uploadResponse.text().catch(() => uploadResponse.statusText); - console.error(`[Tandoor Upload] Failed: ${uploadResponse.status} ${uploadResponse.statusText}`); - console.error(`[Tandoor Upload] Response: ${errorText.substring(0, 200)}`); + const response = await fetch(imageUrl); + if (!response.ok) { return { success: false, - error: `Upload failed (${uploadResponse.status}): ${errorText.substring(0, 200)}` + error: `Failed to download image: ${response.status} ${response.statusText}` }; } - console.log(`[Tandoor Upload] ✓ Success via base64 file upload (${imageBuffer.length} bytes)`); - return { success: true }; + // Get MIME type from response headers (most reliable) + mimeType = response.headers.get('content-type') || 'image/jpeg'; + // Remove charset if present (e.g., "image/jpeg; charset=utf-8") + mimeType = mimeType.split(';')[0].trim(); + + const arrayBuffer = await response.arrayBuffer(); + buffer = Buffer.from(arrayBuffer); + console.log(`[Tandoor Upload] Downloaded ${buffer.length} bytes, MIME: ${mimeType}`); + } + // Unknown format + else { + return { success: false, error: 'Unsupported image format (not HTTP(S) URL or data URL)' }; } - // Strategy 3: Fallback - try to fetch and upload - console.log('[Tandoor Upload] Using fallback fetch strategy'); - const response = await fetch(imageUrl); - const imageBlob = await response.blob(); + // Create proper File object (critical for multipart/form-data) + const extension = getExtensionFromMimeType(mimeType); + const filename = `recipe-image${extension}`; - // Determine file extension from blob type or default to jpg - let extension = '.jpg'; - if (imageBlob.type) { - extension = getExtensionFromMimeType(imageBlob.type); - } + // In Node.js, we must create a File from Blob (Blob alone doesn't work) + const blob = new Blob([buffer], { type: mimeType }); + const file = new File([blob], filename, { type: mimeType }); + + console.log(`[Tandoor Upload] Created File: ${filename} (${file.size} bytes, ${file.type})`); + // Upload to Tandoor const formData = new FormData(); - formData.append('image', imageBlob, `recipe-image${extension}`); + formData.append('image', file); + console.log('[Tandoor Upload] Uploading to Tandoor...'); const uploadResponse = await fetch( `${tandoorConfig.serverUrl}/api/recipe/${recipeId}/image/`, { method: 'PUT', - headers: { 'Authorization': `Bearer ${token}` }, + headers: { + 'Authorization': `Bearer ${token}` + // DO NOT set Content-Type - let fetch set it with boundary + }, body: formData } ); if (!uploadResponse.ok) { const errorText = await uploadResponse.text().catch(() => uploadResponse.statusText); + const responseHeaders = JSON.stringify(Object.fromEntries(uploadResponse.headers.entries())); + console.error(`[Tandoor Upload] Failed: ${uploadResponse.status} ${uploadResponse.statusText}`); - console.error(`[Tandoor Upload] Response: ${errorText.substring(0, 200)}`); + console.error(`[Tandoor Upload] Response headers: ${responseHeaders}`); + console.error(`[Tandoor Upload] Response body: ${errorText.substring(0, 500)}`); + console.error(`[Tandoor Upload] File metadata: ${filename}, ${file.size} bytes, ${file.type}`); + return { success: false, error: `Upload failed (${uploadResponse.status}): ${errorText.substring(0, 200)}` }; } - console.log(`[Tandoor Upload] ✓ Success via fallback (${imageBlob.size} bytes)`); + console.log(`[Tandoor Upload] ✓ Success (${sourceType}, ${file.size} bytes)`); return { success: true }; } catch (error) { const errorMsg = error instanceof Error ? error.message : 'Unknown error'; + const errorStack = error instanceof Error ? error.stack : ''; console.error(`[Tandoor Upload] Exception: ${errorMsg}`); + if (errorStack) { + console.error(`[Tandoor Upload] Stack: ${errorStack}`); + } // Don't fail recipe creation if image fails return { success: false, error: errorMsg }; }