{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/assignar/json-schema/assignar-project-response-schema.json",
  "title": "ProjectResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/assignar-projects-api-openapi.yml#/components/schemas/ProjectResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "readOnly": true
    },
    "client_id": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "address": {
      "type": "string",
      "description": "A full address (street, city/suburb, state, postal code, country)"
    },
    "address_geo": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "Point"
          ]
        },
        "coordinates": {
          "type": "array",
          "items": {
            "type": "number"
          }
        }
      }
    },
    "suburb": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "postcode": {
      "type": "string"
    },
    "external_id": {
      "type": "string"
    },
    "integration_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "active": {
      "type": "boolean"
    },
    "parent_id": {
      "type": "integer"
    },
    "modified_by": {
      "type": "string",
      "readOnly": true
    },
    "modified_time": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "deleted_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "deleted_by_id": {
      "type": "integer",
      "readOnly": true
    },
    "root_path": {
      "type": "string",
      "readOnly": true
    },
    "charge_code_id": {
      "type": "integer"
    },
    "client": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "external_id": {
          "type": "string"
        }
      }
    },
    "parent": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "external_id": {
          "type": "string"
        }
      }
    },
    "sub_projects": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          }
        }
      }
    },
    "charge_code": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "code": {
          "type": "string"
        },
        "label": {
          "type": "string"
        }
      }
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "tag_id": {
            "type": "integer"
          },
          "tag": {
            "$ref": "#/$defs/Tag"
          }
        }
      }
    },
    "activities": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          }
        }
      }
    },
    "supervisors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "employee_id": {
            "type": "string"
          }
        }
      }
    }
  },
  "$defs": {
    "Tag": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "readOnly": true
        },
        "taxonomy": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "color": {
          "type": "string"
        },
        "integration_id": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255,
          "description": "Nullable varchar(255) with uniqueness constraint. Used for external system integration identifiers."
        }
      },
      "required": [
        "taxonomy",
        "name"
      ]
    }
  }
}