{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/GenericObject/v1/schema.json",
  "title": "GenericObject",
  "description": "Objects Grid Generic Object",
  "x-objectsgrid-jsonLd": false,
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique identifier for an Object",
      "type": "string"
    },
    "at_type": {
      "description": "The object type",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "GenericObject"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_id": {
      "description": "This GenericObject's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>: its JSON-LD @id, which References point to. Set by the service.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "readOnly": true
    },
    "objectID": {
      "description": "The user defined Object ID",
      "type": "string"
    },
    "objectType": {
      "description": "The type of the Object",
      "type": "string",
      "minLength": 1
    },
    "namespace": {
      "description": "The Namespace of the Object",
      "type": "string"
    },
    "intAttributes": {
      "description": "Custom Object Attributes of type Integer",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "val": {
            "type": "integer"
          }
        }
      }
    },
    "floatAttributes": {
      "description": "Custom Object Attributes of type Float",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "val": {
            "type": "number"
          }
        }
      }
    },
    "stringAttributes": {
      "description": "Custom Object Attributes of type String",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "val": {
            "type": "string"
          }
        }
      }
    },
    "booleanAttributes": {
      "description": "Custom Object Attributes of type Boolean",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "val": {
            "type": "boolean"
          }
        }
      }
    },
    "dateAttributes": {
      "description": "Custom Object Attributes of type Date Time ISO 8601",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "val": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "objectAttributes": {
      "description": "Custom Object Attributes of type string - Object JSON",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "val": {
            "type": "string"
          }
        }
      }
    },
    "referenceAttributes": {
      "description": "Custom Object Attributes of type string - Reference link to an Object",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "objectType": {
            "type": "string"
          },
          "objectID": {
            "type": "string"
          }
        }
      }
    },
    "tags": {
      "description": "Tags an ABAC policy can decide on. A name may repeat; the same name and value appear once. Every stored object has them: created empty when not sent, kept by a replacement (PUT) that does not mention them, unchanged by a patch that does not mention them, cleared by null or [].",
      "type": "array",
      "default": [],
      "uniqueItems": true,
      "maxItems": 50,
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Tag/v1/schema.json"
      }
    }
  },
  "required": [
    "objectType"
  ]
}
