{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/ecmwf/main/json-schema/ecmwf-user-info-schema.json",
  "title": "UserInfo",
  "description": "Full set of user information handled by the service.",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ecmwf-data-stores-profiles-openapi.yml#/components/schemas/UserInfo",
  "properties": {
    "id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Id"
    },
    "sub": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sub"
    },
    "role": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Role"
    },
    "email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email"
    },
    "preferred_username": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Preferred Username"
    },
    "given_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Given Name"
    },
    "family_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Family Name"
    },
    "thematic_activity": {
      "anyOf": [
        {
          "$ref": "#/$defs/RelatedData"
        },
        {
          "type": "null"
        }
      ]
    },
    "affiliation": {
      "anyOf": [
        {
          "$ref": "#/$defs/RelatedData"
        },
        {
          "type": "null"
        }
      ]
    },
    "activity_sector": {
      "anyOf": [
        {
          "$ref": "#/$defs/RelatedData"
        },
        {
          "type": "null"
        }
      ]
    },
    "country": {
      "anyOf": [
        {
          "$ref": "#/$defs/RelatedData"
        },
        {
          "type": "null"
        }
      ]
    },
    "organisation": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Organisation"
    },
    "contactable": {
      "type": "boolean",
      "title": "Contactable",
      "default": true
    },
    "starred_datasets": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Starred Datasets",
      "default": []
    },
    "tags": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Tags",
      "default": []
    },
    "origin_portal": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Origin Portal"
    }
  },
  "type": "object",
  "$defs": {
    "RelatedData": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "title": {
          "type": "string",
          "title": "Title"
        }
      },
      "type": "object",
      "required": [
        "id",
        "title"
      ],
      "title": "RelatedData",
      "description": "Related data model."
    }
  }
}