{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/ABACPolicy/v1/schema.json",
  "title": "ABACPolicy",
  "description": "Objects Grid ABACPolicy Private Object",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique identifier for ABACPolicy",
      "type": "string",
      "minLength": 0,
      "maxLength": 25
    },
    "policy": {
      "description": "The policy, a Rego module in package abac. allow decides an action on an object type and on each object, deny overrides allow; redact names the fields to hide from the subject and visible, when defined, the only fields to show (paths such as cost, brand.url, offers.price). The input: subject (id, objectType, tags), action (create, retrieve, list, update, patch, delete, retag), objectType (the catalog name of the type the request addresses, the same at both stages; Enum for the enumerations at /enums), object (the stored object; its own type is object.meta.objectType, null at the operation stage and on create), newObject and changedFields (for create, update and patch). Administrators are not subject to it.",
      "type": "string",
      "minLength": 1
    },
    "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": [
    "policy"
  ]
}
