{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/AppConfiguration/v1/schema.json",
  "title": "AppConfiguration",
  "description": "Objects Grid AppConfiguration Object. The runtime settings of one application in one environment, read by the application at start and polled with If-None-Match. Its id is yours: <application>_<environment>, e.g. web-shop_production. Every change is a version (meta.objectVersion): a rollback is a PUT of an earlier one. Not for secrets: it is stored as sent, returned to every caller the policy lets read it, and reaches search and webhooks; keep keys and passwords in a secret store and point to them. ObjectsGrid's own type. It has no JSON-LD document.",
  "x-objectsgrid-jsonLd": false,
  "type": "object",
  "properties": {
    "at_type": {
      "description": "The object type",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "AppConfiguration"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_id": {
      "description": "This AppConfiguration's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>. Set by the service.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "readOnly": true
    },
    "id": {
      "description": "The AppConfiguration's id, chosen by you",
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,49}$"
    },
    "identifier": {
      "description": "The AppConfiguration's id. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "url": {
      "description": "This AppConfiguration URL. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "minLength": 1,
      "readOnly": true
    },
    "application": {
      "description": "The application's name, e.g. web-shop",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "environment": {
      "description": "The application's environment, e.g. development, staging, production: yours, not ObjectsGrid's TEST and PROD",
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{0,30}$"
    },
    "description": {
      "description": "What the configuration is for",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 1000
    },
    "settings": {
      "description": "The settings, any JSON object. Not for secrets: it is stored as sent, returned to every caller the policy lets read it, and reaches search and webhooks; keep keys and passwords in a secret store and point to them. At most 256 KB. Stored and returned, not searchable.",
      "type": "object",
      "x-objectsgrid-maxBytes": 262144
    },
    "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"
      }
    },
    "meta": {
      "description": "System-managed metadata for the object (version, audit fields). Assigned by the server.",
      "$ref": "https://objectsgrid.com/.well-known/objects-catalog/ObjectMeta/v1/schema.json",
      "readOnly": true
    }
  },
  "required": [
    "id",
    "application",
    "environment",
    "settings"
  ],
  "unevaluatedProperties": false
}
