# Example Nickel schema for TypeDialog form generation
#
# This demonstrates how to structure a Nickel configuration schema
# that TypeDialog can parse and convert to interactive forms.

{
  # Application configuration group
  app = {
    name : String
      | doc "Application name"
      = "my-app",

    version : String
      | doc "Application version (semantic versioning)"
      = "1.0.0",

    environment : String
      | doc "Environment (development, staging, production)"
      = "development",
  },

  # Server configuration group
  server = {
    host : String
      | doc "Server hostname or IP address"
      = "0.0.0.0",

    port : Number
      | doc "Server port number"
      = 8080,

    workers : Number
      | doc "Number of worker threads"
      = 4,
  },

  # Database configuration group
  database = {
    url : String
      | doc "Database connection URL"
      = "postgresql://localhost/myapp",

    pool_size : Number
      | doc "Database connection pool size"
      = 10,

    read_timeout : Number
      | doc "Read timeout in seconds"
      = 30,
  },

  # TLS/SSL configuration
  tls = {
    enabled : Bool
      | doc "Enable TLS/SSL"
      = false,

    cert_path : String
      | doc "Path to TLS certificate"
      = "",

    key_path : String
      | doc "Path to TLS private key"
      = "",
  },

  # Features configuration (optional group)
  features = {
    monitoring : Bool
      | doc "Enable monitoring and metrics"
      = false,

    caching : Bool
      | doc "Enable response caching"
      = true,

    cors : Bool
      | doc "Enable CORS headers"
      = true,
  },
}
