{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/access_app_req_embedded_policies",
  "title": "access_app_req_embedded_policies",
  "properties": {
    "policies": {
      "description": "The policies that will apply to the application, in ascending order of precedence. Items can reference existing policies or create new policies exclusive to the application.",
      "items": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/access_app_policy_link"
          },
          {
            "allOf": [
              {
                "description": "A policy UID to link to this application."
              },
              {
                "$ref": "#/components/schemas/access_schemas-uuid"
              }
            ]
          },
          {
            "allOf": [
              {
                "type": "object"
              },
              {
                "description": "An application-scoped policy JSON. If the policy does not yet exist, it will be created.",
                "properties": {
                  "id": {
                    "$ref": "#/components/schemas/access_schemas-uuid"
                  }
                }
              },
              {
                "$ref": "#/components/schemas/access_app_policy_request"
              }
            ]
          }
        ]
      },
      "type": "array"
    }
  },
  "type": "object"
}