{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rotageek/json-schema/rotageek-rotageek-asp-net-core-public-api-models-create-location-model-schema.json",
  "title": "Rotageek.AspNetCore.PublicApi.Models.CreateLocationModel",
  "description": "Object container for location creation",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rotageek-locations-api-openapi.yml#/components/schemas/Rotageek.AspNetCore.PublicApi.Models.CreateLocationModel",
  "required": [
    "id",
    "name",
    "region"
  ],
  "type": "object",
  "properties": {
    "id": {
      "minLength": 1,
      "type": "string",
      "description": "New unique location id (max length: 250)"
    },
    "name": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string",
      "description": "Name of the new location (max length: 200)"
    },
    "region": {
      "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.LocationRegion"
    },
    "addressLine1": {
      "maxLength": 200,
      "type": [
        "string",
        "null"
      ],
      "description": "Address line 1 of the new location (max length: 200)"
    },
    "addressLine2": {
      "maxLength": 200,
      "type": [
        "string",
        "null"
      ],
      "description": "Address line 2 of the new location (max length: 200)"
    },
    "town": {
      "maxLength": 200,
      "type": [
        "string",
        "null"
      ],
      "description": "Town of the new location (max length: 200)"
    },
    "country": {
      "maxLength": 200,
      "type": [
        "string",
        "null"
      ],
      "description": "Country of the new location (max length: 200)"
    },
    "postcode": {
      "maxLength": 10,
      "type": [
        "string",
        "null"
      ],
      "description": "Post code of the new location (max length: 10)"
    },
    "hierarchy": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "A sequence (non-ordered) of cluster item specified as \"tier-name\": \"cluster-name\"\nExample:\n{\n    \"Country\": \"England\",\n    \"City\": \"London\",\n    \"Area\": \"West End\"\n}"
    },
    "coordinates": {
      "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.LocationCoordinates"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Rotageek.AspNetCore.PublicApi.Models.LocationCoordinates": {
      "type": "object",
      "properties": {
        "latitude": {
          "maximum": 90,
          "minimum": -90,
          "type": "number",
          "description": "Location latitude. Valid range -90 to 90.",
          "format": "double"
        },
        "longitude": {
          "maximum": 180,
          "minimum": -180,
          "type": "number",
          "description": "Location longitude. Valid range -180 to 180.",
          "format": "double"
        }
      },
      "additionalProperties": false
    },
    "Rotageek.AspNetCore.PublicApi.Models.LocationRegion": {
      "enum": [
        "England",
        "Scotland",
        "NorthernIreland",
        "Wales",
        "AustraliaMelbourne",
        "Ireland",
        "Germany",
        "Netherlands",
        "HongKong"
      ],
      "type": "string",
      "description": "Describes available regions for the location"
    }
  }
}