{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contract": {
      "type": "string",
      "const": "RouteSpace"
    },
    "schemaVersion": {
      "type": "number",
      "const": 1
    },
    "routeSpaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "supportedSurface": {
      "type": "string",
      "enum": [
        "studio",
        "kernel"
      ]
    },
    "basePath": {
      "type": "string",
      "pattern": "^\\/(?!\\/)"
    },
    "caseSensitive": {
      "type": "boolean"
    },
    "trailingSlash": {
      "type": "string",
      "enum": [
        "preserve",
        "remove",
        "require"
      ]
    },
    "reservedPaths": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^\\/(?!\\/)"
      }
    },
    "parameters": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "type": {
            "type": "string",
            "enum": [
              "identifier",
              "integer",
              "slug",
              "uuid"
            ]
          },
          "required": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "type",
          "required"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "contract",
    "schemaVersion",
    "routeSpaceId",
    "supportedSurface",
    "basePath",
    "caseSensitive",
    "trailingSlash",
    "reservedPaths",
    "parameters"
  ],
  "additionalProperties": false,
  "$id": "https://schemas.infmonkeys.com/contracts/route-space.schema.json",
  "title": "route-space"
}
