{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agstack/json-schema/agstack-pesticide-schema.json",
  "title": "Pesticide",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agstack-pesticides-api-openapi.yml#/components/schemas/Pesticide",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "hasCommercialName": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "hasCost": {
      "type": "string",
      "format": "decimal",
      "pattern": "^-?\\d{0,8}(?:\\.\\d{0,2})?$"
    },
    "isPricePer": {
      "type": "string"
    },
    "hasActiveSubstance": {
      "type": "string"
    },
    "isTargetedTowards": {
      "type": "string"
    },
    "hasPreharvestInterval": {
      "type": "integer"
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/StatusEnum"
        }
      ],
      "minimum": -2147483648,
      "maximum": 2147483647
    },
    "dateCreated": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "dateModified": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "invalidatedAtTime": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    }
  },
  "required": [
    "dateCreated",
    "dateModified",
    "hasActiveSubstance",
    "hasCommercialName",
    "hasCost",
    "hasPreharvestInterval",
    "id",
    "invalidatedAtTime",
    "isPricePer",
    "isTargetedTowards"
  ],
  "$defs": {
    "StatusEnum": {
      "enum": [
        0,
        1,
        2
      ],
      "type": "integer",
      "description": "* `0` - Inactive\n* `1` - Active\n* `2` - Deleted"
    }
  }
}