{
  "$schema": "http://json-schema.org/schema",
  "id": "NxPluginGenerator",
  "title": "Create a Generator for an Nx Plugin",
  "type": "object",
  "examples": [
    {
      "command": "g generator my-generator --project=my-plugin",
      "description": "Generate libs/my-plugin/src/generators/my-generator"
    }
  ],
  "properties": {
    "project": {
      "type": "string",
      "description": "The name of the project.",
      "alias": "p",
      "$default": {
        "$source": "projectName"
      },
      "x-prompt": "What is the name of the project for the generator?"
    },
    "name": {
      "type": "string",
      "description": "Schematic name",
      "$default": {
        "$source": "argv",
        "index": 0
      },
      "x-prompt": "What name would you like to use for the generator?"
    },
    "description": {
      "type": "string",
      "description": "Schematic description",
      "alias": "d"
    },
    "unitTestRunner": {
      "type": "string",
      "enum": ["jest", "none"],
      "description": "Test runner to use for unit tests",
      "default": "jest"
    }
  },
  "required": ["project", "name"]
}
