{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aura-historia-com/json-schema/aura-historia-com-create-user-address-schema.json",
  "title": "CreateUserAddress",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aura-historia-com-users-api-openapi.yml#/components/schemas/CreateUserAddress",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "label",
    "geography"
  ],
  "properties": {
    "label": {
      "$ref": "#/$defs/UserAddressLabel"
    },
    "geography": {
      "$ref": "#/$defs/UserAddressGeography"
    }
  },
  "$defs": {
    "PartyLocationGeography": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "referenceRelease"
      ],
      "properties": {
        "referenceRelease": {
          "type": "string",
          "enum": [
            "iso-codes-4.20.1"
          ]
        },
        "addressText": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 4096,
          "description": "Verbatim free-text assertion; at most 4096 UTF-8 bytes. No geocoding or postal inference."
        },
        "country": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[A-Z]{2}$",
          "description": "Exact current ISO alpha-2 country in the named immutable release."
        },
        "subdivision": {
          "type": [
            "string",
            "null"
          ],
          "description": "Complete ISO 3166-2 code in the named release; must agree with country when supplied."
        },
        "postalCode": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 64,
          "description": "Single-line verbatim postal assertion, at most 64 UTF-8 bytes."
        }
      },
      "description": "Partial caller assertions. At least one geographic field must be present and nonblank. Coordinates are separate. No synchronous geocoding."
    },
    "UserAddressGeography": {
      "allOf": [
        {
          "$ref": "#/$defs/PartyLocationGeography"
        },
        {
          "type": "object",
          "required": [
            "addressText"
          ],
          "properties": {
            "addressText": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            }
          }
        }
      ],
      "description": "Verbatim free-text geographic assertions. addressText is required and non-null; no parsed street or PlaceId. Provider-derived values remain separate."
    },
    "UserAddressLabel": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "description": "Nonblank private label, at most 128 UTF-8 bytes, without control characters."
    }
  }
}