"""Schema for PATCH /order endpoint.""" from marshmallow import fields, Schema, validate from ows_product_physical.constant.delivery_order import ORDER_STATUS class PatchOrderPayloadSchema(Schema): """Validation schema for payload for PATCH /order endpoint.""" order_id = fields.Number(required=True) status = fields.String(required=False, validate=validate.OneOf(ORDER_STATUS)) output_file = fields.String(required=False) class PatchOrdersPayloadSchema(Schema): """Validation schema for payload for PATCH /orders endpoint.""" items = fields.List( fields.Nested(PatchOrderPayloadSchema), required=True)