{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/OrderItem/v1/schema.json",
  "title": "OrderItem",
  "description": "Objects Grid OrderItem. One line of an Order: what was ordered, how many, and the line's status. Stored inside the Order. Modeled in compliance with https://schema.org/OrderItem.",
  "type": "object",
  "properties": {
    "at_type": {
      "description": "The object type",
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "OrderItem"
      ]
    },
    "orderItemNumber": {
      "description": "The identifier of the line, unique within the Order; a ParcelDelivery's itemShipped names it",
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 50
    },
    "orderQuantity": {
      "description": "The number of the item ordered; 1 when not given",
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "orderItemStatus": {
      "description": "The current status of the line, e.g. OrderInTransit, OrderDelivered",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/OrderStatus/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "orderedItem": {
      "description": "The item ordered",
      "x-objectsgrid-rangeIncludes": [
        "Product",
        "ProductGroup",
        "ProductModel",
        "Service",
        "Event"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "orderedItem"
  ],
  "unevaluatedProperties": false
}
