{
  "$schema": "http://json-schema.org/schema",
  "id": "@nxrocks/nx-ktor:project",
  "description": "Ktor Project Generator.",
  "title": "Creates a Ktor application in the workspace",
  "outputCapture": "pipe",
  "type": "object",
  "properties": {
    "directory": {
      "type": "string",
      "description": "The directory of the new project.",
      "alias": "dir",
      "$default": {
        "$source": "argv",
        "index": 0
      },
      "x-prompt": "Which directory do you want to create the project in?"
    },
    "ktorVersion": {
      "description": "Ktor version.",
      "type": "string",
      "default": "3.0.3"
    },
    "buildSystem": {
      "description": "Build system to use.",
      "alias": "type",
      "default": "GRADLE_KTS",
      "type": "string",
      "x-prompt": {
        "message": "Which build system would you like to use?",
        "type": "list",
        "items": [
          {
            "value": "MAVEN",
            "label": "Maven"
          },
          {
            "value": "GRADLE",
            "label": "Gradle"
          },
          {
            "value": "GRADLE_KTS",
            "label": "Gradle Kotlin"
          }
        ]
      },
      "x-priority": "important"
    },
    "kotlinVersion": {
      "description": "Kotlin version.",
      "type": "string",
      "default": "2.1.10"
    },
    "engine": {
      "description": "Engine to use to serve the application.",
      "type": "string",
      "default": "NETTY",
      "enum": ["NETTY", "JETTY", "CIO", "TOMCAT"],
      "x-prompt": {
        "message": "Which engine(application server) would you like to use?",
        "type": "list",
        "items": [
          {
            "value": "NETTY",
            "label": "Netty"
          },
          {
            "value": "JETTY",
            "label": "Jetty"
          },
          {
            "value": "CIO",
            "label": "Cio"
          },
          {
            "value": "TOMCAT",
            "label": "Tomcat"
          }
        ]
      },
      "x-priority": "important"
    },
    "groupId": {
      "description": "Group Id of the project.",
      "type": "string",
      "default": "com.example",
      "x-prompt": "What groupId would you like to use?",
      "x-priority": "important"
    },
    "artifactId": {
      "description": "Artifact Id of the project.",
      "type": "string",
      "default": "demo",
      "x-prompt": "What artifactId would you like to use?",
      "x-priority": "important"
    },
    "name": {
      "type": "string",
      "description": "Name of the project.",
      "alias": "projectName",
      "pattern": "^[a-zA-Z][^:]*$",
      "x-priority": "important"
    },
    "configurationLocation": {
      "description": "Configuratin Location.",
      "type": "string",
      "default": "CODE",
      "enum": ["YAML", "HOCON", "CODE"],
      "x-prompt": {
        "message": "Where would you like to put the configuration in?",
        "type": "list",
        "items": [
          {
            "value": "YAML",
            "label": "YAML file"
          },
          {
            "value": "HOCON",
            "label": "HOCON file"
          },
          {
            "value": "CODE",
            "label": "Code"
          }
        ]
      },
      "x-priority": "important"
    },
    "skipFormat": {
      "description": "Skip formatting files (using Spotless plugin).",
      "type": "boolean",
      "default": true,
      "x-priority": "internal"
    },
    "skipCodeSamples": {
      "description": "Skip genetating code samples.",
      "type": "boolean",
      "default": false,
      "x-prompt": "Would you like to include code samples?"
    },
    "features": {
      "description": "Features to use in the project(comma-separated). Follow this guide https://t.ly/s9bo for more instructions on how to proceed.",
      "type": "string",
      "x-priority": "important"
    },
    "transformIntoMultiModule": {
      "description": "Transform the project into a multi-module project. Follow this guide https://t.ly/dZelN for more information.",
      "type": "boolean"
    },
    "addToExistingParentModule": {
      "description": "Add the project into an existing parent module project. Follow this guide https://t.ly/dZelN for more information.",
      "type": "boolean"
    },
    "parentModuleName": {
      "description": "Name of the parent module to create or to add child project into.",
      "type": "string"
    },
    "keepProjectLevelWrapper": {
      "description": "Keep the `Maven` or `Gradle` wrapper files from child project (when generating a multi-module project). Follow this guide https://t.ly/dZelN for more information.",
      "type": "boolean",
      "default": true
    },
    "ktorInitializrUrl": {
      "type": "string",
      "default": "https://start.ktor.io",
      "description": "The URL to the Ktor Initializr instance to use to generate the project.",
      "x-priority": "internal"
    },
    "proxyUrl": {
      "type": "string",
      "description": "The URL of the (corporate) proxy server to use to access Ktor Initializr.",
      "x-priority": "internal"
    },
    "tags": {
      "type": "string",
      "description": "Add tags to the project (used for linting).",
      "alias": "t",
      "x-priority": "internal"
    }
  },
  "required": ["directory"]
}
