openapi: 3.2.0 info: title: Tandoor Shopping List Entry API version: 0.0.0 (2.6.13) x-logo: url: /static/assets/brand_logo.svg backgroundColor: '#FFFFFF' altText: Tandoor logo href: / description: Tandoor API Docs tags: - name: Shopping List Entry paths: /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: - Shopping List Entry security: - ApiKeyAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedShoppingListEntryList' description: '' summary: Api shopping list entry list x-summary-source: derived 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: - Shopping List Entry 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: '' summary: Api shopping list entry create x-summary-source: derived /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: - Shopping List Entry security: - ApiKeyAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ShoppingListEntry' description: '' summary: Api shopping list entry retrieve x-summary-source: derived 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: - Shopping List Entry 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: '' summary: Api shopping list entry update x-summary-source: derived 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: - Shopping List Entry 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: '' summary: Api shopping list entry partial update x-summary-source: derived 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: - Shopping List Entry security: - ApiKeyAuth: [] responses: '204': description: No response body summary: Api shopping list entry destroy x-summary-source: derived /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: - Shopping List Entry 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: '' summary: Api shopping list entry bulk create x-summary-source: derived components: schemas: SupermarketCategory: type: object description: "Moves `UniqueValidator`'s from the validation stage to the save stage.\nIt solves the problem with nested validation for unique fields on update.\n\nIf you want more details, you can read related issues and articles:\nhttps://github.com/beda-software/drf-writable-nested/issues/1\nhttp://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers\n\nExample of usage:\n```\n class Child(models.Model):\n field = models.CharField(unique=True)\n\n\nclass Parent(models.Model):\n child = models.ForeignKey('Child')\n\n\nclass ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):\n class Meta:\n model = Child\n\n\nclass ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):\n child = ChildSerializer()\n\n class Meta:\n model = Parent\n```\n\nNote: `UniqueFieldsMixin` must be applied only on the serializer\nwhich has unique fields.\n\nNote: When you are using both mixins\n(`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)\nyou should put `UniqueFieldsMixin` ahead." properties: id: type: integer readOnly: false name: type: string maxLength: 128 minLength: 1 description: type: - string - 'null' open_data_slug: type: - string - 'null' maxLength: 128 required: - name FoodShopping: type: object properties: id: type: integer readOnly: false name: type: string maxLength: 128 minLength: 1 plural_name: type: - string - 'null' maxLength: 128 supermarket_category: allOf: - $ref: '#/components/schemas/SupermarketCategory' readOnly: true shopping_lists: type: array items: $ref: '#/components/schemas/ShoppingList' readOnly: true required: - name - shopping_lists - supermarket_category ShoppingListEntryBulk: type: object properties: ids: type: array items: {} checked: type: - boolean - 'null' timestamp: type: string format: date-time readOnly: true shopping_lists_add: type: array items: type: integer shopping_lists_remove: type: array items: type: integer shopping_lists_set: type: array items: type: integer shopping_lists_remove_all: type: boolean default: false required: - ids - timestamp 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' 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 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 PatchedShoppingListEntry: type: object description: Adds nested create feature properties: id: type: integer readOnly: false list_recipe: type: - integer - 'null' shopping_lists: type: array items: $ref: '#/components/schemas/ShoppingList' food: allOf: - $ref: '#/components/schemas/FoodShopping' unit: allOf: - $ref: '#/components/schemas/Unit' amount: type: number format: double order: type: integer maximum: 2147483647 minimum: -2147483648 checked: type: boolean ingredient: type: - integer - 'null' 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 - 'null' format: date-time delay_until: type: - string - 'null' format: date-time 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 Unit: type: object description: "Moves `UniqueValidator`'s from the validation stage to the save stage.\nIt solves the problem with nested validation for unique fields on update.\n\nIf you want more details, you can read related issues and articles:\nhttps://github.com/beda-software/drf-writable-nested/issues/1\nhttp://www.django-rest-framework.org/api-guide/validators/#updating-nested-serializers\n\nExample of usage:\n```\n class Child(models.Model):\n field = models.CharField(unique=True)\n\n\nclass Parent(models.Model):\n child = models.ForeignKey('Child')\n\n\nclass ChildSerializer(UniqueFieldsMixin, serializers.ModelSerializer):\n class Meta:\n model = Child\n\n\nclass ParentSerializer(NestedUpdateMixin, serializers.ModelSerializer):\n child = ChildSerializer()\n\n class Meta:\n model = Parent\n```\n\nNote: `UniqueFieldsMixin` must be applied only on the serializer\nwhich has unique fields.\n\nNote: When you are using both mixins\n(`UniqueFieldsMixin` and `NestedCreateMixin` or `NestedUpdateMixin`)\nyou should put `UniqueFieldsMixin` ahead." properties: id: type: integer readOnly: false name: type: string maxLength: 128 minLength: 1 plural_name: type: - string - 'null' maxLength: 128 description: type: - string - 'null' base_unit: type: - string - 'null' maxLength: 256 open_data_slug: type: - string - 'null' maxLength: 128 required: - name ShoppingListRecipe: type: object properties: id: type: integer readOnly: false name: type: string maxLength: 32 recipe: type: - integer - 'null' recipe_data: allOf: - $ref: '#/components/schemas/RecipeOverview' readOnly: true meal_plan_data: allOf: - $ref: '#/components/schemas/MealPlan' readOnly: true mealplan: type: - integer - 'null' servings: type: number format: double created_by: allOf: - $ref: '#/components/schemas/User' readOnly: true required: - created_by - meal_plan_data - recipe_data - servings KeywordLabel: type: object properties: id: type: integer readOnly: false label: type: string readOnly: true required: - label ShoppingList: type: object description: Adds nested create feature properties: id: type: integer readOnly: false name: type: string maxLength: 32 description: type: string color: type: - string - 'null' maxLength: 7 required: [] PaginatedShoppingListEntryList: type: object required: - count - results properties: count: type: integer example: 123 next: type: - string - 'null' format: uri example: http://api.example.org/accounts/?page=4 previous: type: - string - 'null' format: uri example: http://api.example.org/accounts/?page=2 results: type: array items: $ref: '#/components/schemas/ShoppingListEntry' timestamp: type: string format: date-time MealType: type: object description: Adds nested create feature properties: id: type: integer readOnly: false name: type: string maxLength: 128 order: type: integer maximum: 2147483647 minimum: -2147483648 time: type: - string - 'null' format: time color: type: - string - 'null' maxLength: 7 created_by: type: integer readOnly: true required: - created_by - name RecipeOverview: type: object description: Adds nested create feature properties: id: type: integer readOnly: false name: type: string maxLength: 128 description: type: - string - 'null' maxLength: 512 image: type: - string - 'null' format: uri readOnly: 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 - 'null' format: double readOnly: true last_cooked: type: - string - 'null' format: date-time readOnly: 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 ShoppingListEntry: type: object description: Adds nested create feature properties: id: type: integer readOnly: false list_recipe: type: - integer - 'null' shopping_lists: type: array items: $ref: '#/components/schemas/ShoppingList' food: allOf: - $ref: '#/components/schemas/FoodShopping' unit: allOf: - $ref: '#/components/schemas/Unit' amount: type: number format: double order: type: integer maximum: 2147483647 minimum: -2147483648 checked: type: boolean ingredient: type: - integer - 'null' 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 - 'null' format: date-time delay_until: type: - string - 'null' format: date-time 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 User: type: object description: Adds nested create feature properties: id: type: integer readOnly: false username: type: string readOnly: true description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. first_name: type: string maxLength: 150 last_name: type: string maxLength: 150 display_name: type: string readOnly: true is_staff: type: boolean readOnly: true title: Staff status description: Designates whether the user can log into this admin site. is_superuser: type: boolean readOnly: true title: Superuser status description: Designates that this user has all permissions without explicitly assigning them. is_active: type: boolean readOnly: true title: Active description: Designates whether this user should be treated as active. Unselect this instead of deleting accounts. required: - display_name - is_active - is_staff - is_superuser - username securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization