{
  "$schema": "http://json-schema.org/schema",
  "$id": "KosModel",
  "title": "",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "model name",
      "$default": {
        "$source": "argv",
        "index": 0
      },
      "x-prompt": "What name would you like to use?"
    },
    "modelProject": {
      "type": "string",
      "description": "The project where the model will be located.",
      "x-prompt": "Which project will this model be located in?",
      "x-dropdown": "projects"
    },
    "registrationProject": {
      "type": "string",
      "description": "The project where the model will be registered.  Defaults to the appProject if not specified",
      "x-prompt": "Which project will this model put UI components?",
      "x-dropdown": "projects"
    },
    "container": {
      "type": "boolean",
      "description": "Should a container model be created for this model?",
      "x-prompt": "Should a container model be created for this model?",
      "default": false
    },
    "parentAware": {
      "type": "boolean",
      "description": "Should the model be aware of its parent container?",
      "x-prompt": "Should the model be aware of its parent container?",
      "default": false
    },
    "isContainerSingleton": {
      "type": "boolean",
      "description": "Should a container model be created as a singleton?",
      "x-prompt": "Should a container model be created as a singleton?",
      "default": true
    },
    "modelDirectory": {
      "type": "string",
      "description": "the directory withing the model project to create the model",
      "default": ""
    },
    "singleton": {
      "type": "boolean",
      "default": false,
      "description": "Is there a need for more than one instance of this model type"
    },
    "autoRegister": {
      "type": "boolean",
      "default": false,
      "description": "Automatically register the model with the framework (escape hatch for plugins)"
    },
    "unitTests": {
      "type": "boolean",
      "default": false,
      "description": "Generate unit tests for this model?"
    },
    "dataServices": {
      "type": "boolean",
      "default": false,
      "description": "Generate data services for this model?"
    },
    "skipRegistration": {
      "type": "boolean",
      "default": false,
      "description": "skip automated registration of the model?"
    },
    "companion": {
      "type": "boolean",
      "required": false,
      "default": false,
      "description": "skip automated registration of the model?"
    },
    "companionParentModel": {
      "type": "string",
      "required": false,
      "description": "the name of the model that this model will be a companion to"
    },
    "companionModelProject": {
      "type": "string",
      "required": false,
      "description": "The project where the companion parent is currently located",
      "x-prompt": "Which project contains the companion parent?",
      "x-dropdown": "projects"
    },
    "companionPattern": {
      "type": "string",
      "description": "Which companion pattern to use",
      "enum": ["composition", "decorator"],
      "default": "composition",
      "x-prompt": {
        "message": "Which companion pattern to use?",
        "type": "list",
        "items": [
          {
            "value": "composition",
            "label": "Composition (recommended) - explicit parent access via this.parent"
          },
          {
            "value": "decorator",
            "label": "Decorator - transparent parent access, drop-in replacement"
          }
        ]
      }
    },
    "futureAware": {
      "type": "string",
      "description": "Include Future-aware capabilities for progress tracking",
      "enum": ["none", "minimal", "complete"],
      "default": "none",
      "x-prompt": {
        "message": "Include Future-aware capabilities?",
        "type": "list",
        "items": [
          { "value": "none", "label": "No Future support" },
          {
            "value": "minimal",
            "label": "Minimal (external access only)"
          },
          {
            "value": "complete",
            "label": "Complete (internal + external access)"
          }
        ]
      }
    }
  },
  "required": ["name"]
}
