openapi: 3.1.1 info: title: Retail — Grocery Resource Attributes (v2.1) version: 2.1.0 description: > Grocery-specific resource attributes for packaged foods and fresh produce. Migrated from GroceryItem (v2) to the v2.1 generalised model. Extends RetailResource via allOf to add nutrition and fresh produce properties. Attaches to beckn:Resource via resourceAttributes. components: schemas: GroceryResource: type: object additionalProperties: false x-beckn-container: resourceAttributes x-jsonld: "@context": "https://schema.beckn.io/GroceryResource/v2.1/context.jsonld" "@type": groc:GroceryResource allOf: - $ref: "../../RetailResource/v2.1/attributes.yaml#/components/schemas/RetailResource" - type: object properties: nutrition: type: array items: type: object additionalProperties: false required: [nutrient, value] properties: nutrient: type: string description: Name of the nutrient (e.g., Energy, Protein, Carbohydrates, Fat, Fiber, Sodium) x-jsonld: "@id": "groc:nutrient" value: allOf: - $ref: "https://schema.beckn.io/Quantity/2.0#/components/schemas/Quantity" description: Nutrient value using Beckn core Quantity (unitQuantity, unitCode per 100g or serving) x-jsonld: "@id": "groc:nutritionValue" description: Array of nutrition facts (per 100g or serving size) x-jsonld: "@id": "groc:nutrition" freshProduce: type: object additionalProperties: false properties: netQuantityDeclaration: type: string description: Net quantity declaration for fresh produce (e.g., "1 kg", "500g", "5 units") x-jsonld: "@id": "groc:netQuantityDeclaration" description: Fresh produce-specific attributes (harvested, bulk items without standard packaging) x-jsonld: "@id": "groc:freshProduce"