{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/noozra/json-schema/noozra-award-schema.json",
  "title": "Award",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/noozra-openapi.json#/components/schemas/Award",
  "properties": {
    "agency": {
      "type": [
        "string",
        "null"
      ]
    },
    "amount": {
      "description": "Dollars.",
      "type": [
        "number",
        "null"
      ]
    },
    "award_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "award_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "date": {
      "description": "YYYY-MM-DD: the day the contract was awarded.",
      "format": "date",
      "type": "string"
    },
    "description": {
      "description": "The source's own text, at most 1000 characters.",
      "type": [
        "string",
        "null"
      ]
    },
    "end_date": {
      "format": "date",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "format": "uuid",
      "type": "string"
    },
    "naics": {
      "oneOf": [
        {
          "$ref": "#/$defs/Classification"
        },
        {
          "type": "null"
        }
      ]
    },
    "place": {
      "$ref": "#/$defs/Place"
    },
    "psc": {
      "oneOf": [
        {
          "$ref": "#/$defs/Classification"
        },
        {
          "type": "null"
        }
      ]
    },
    "recipient": {
      "type": [
        "string",
        "null"
      ]
    },
    "reference": {
      "description": "The record's own number at its source.",
      "type": "string"
    },
    "source": {
      "description": "Who published the record. Name it when you show the record.",
      "type": "string"
    },
    "start_date": {
      "format": "date",
      "type": [
        "string",
        "null"
      ]
    },
    "sub_agency": {
      "type": [
        "string",
        "null"
      ]
    },
    "url": {
      "description": "The record at its source; for a city record without a page of its own, the city's dataset.",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "agency",
    "amount",
    "award_id",
    "award_type",
    "date",
    "description",
    "end_date",
    "id",
    "naics",
    "place",
    "psc",
    "recipient",
    "reference",
    "source",
    "start_date",
    "sub_agency",
    "url"
  ],
  "type": "object",
  "$defs": {
    "Classification": {
      "properties": {
        "code": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "code",
        "description"
      ],
      "type": "object"
    },
    "Place": {
      "properties": {
        "address": {
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "description": "ISO 3166-1 alpha-3, such as USA.",
          "type": [
            "string",
            "null"
          ]
        },
        "latitude": {
          "type": [
            "number",
            "null"
          ]
        },
        "longitude": {
          "type": [
            "number",
            "null"
          ]
        },
        "state": {
          "description": "Two-letter state.",
          "type": [
            "string",
            "null"
          ]
        },
        "zip": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "address",
        "city",
        "state",
        "zip",
        "country",
        "latitude",
        "longitude"
      ],
      "type": "object"
    }
  }
}