{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "server": {
      "type": "object",
      "description": "The HTTP server.",
      "properties": {
        "path": {
          "type": "string",
          "description": "Path the application is served under, e.g. / or /app/.",
          "x-cell-public": true
        },
        "port": {
          "type": "integer",
          "description": "Port the server listens on. Override with CELL_SERVER__PORT."
        },
        "host": {
          "type": "string",
          "description": "Interface the server listens on; 0.0.0.0 in containers (CELL_SERVER__HOST=0.0.0.0)."
        },
        "endpoint": {
          "type": "string",
          "description": "Absolute URL of the server, used to build absolute links and RPC endpoints.",
          "x-cell-public": true
        }
      }
    },
    "web": {
      "type": "object",
      "description": "Web layer of the server.",
      "properties": {
        "session": {
          "type": "object",
          "description": "Sessions.",
          "properties": {
            "autoCommit": {
              "type": "boolean",
              "description": "Save the session at the end of every request."
            },
            "maxAge": {
              "type": "number",
              "description": "Lifetime of a session, in milliseconds."
            },
            "renew": {
              "type": "boolean",
              "description": "Renew a session that is about to expire."
            },
            "sessionIdKey": {
              "type": "string",
              "description": "Cookie that holds the session id."
            },
            "sessionKey": {
              "type": "string",
              "description": "Key of the session in the session store."
            }
          },
          "additionalProperties": true
        },
        "cookies": {
          "type": "object",
          "description": "Cookies.",
          "properties": {
            "keys": {
              "type": "array",
              "description": "Keys that sign cookies; set your own in production.",
              "items": {
                "type": "string"
              }
            },
            "secure": {
              "type": "boolean",
              "description": "Mark cookies secure; default: when the request is https."
            }
          }
        },
        "trace": {
          "type": "object",
          "description": "Request tracing.",
          "properties": {
            "requestField": {
              "type": "string",
              "description": "Request header with the trace id."
            },
            "responseField": {
              "type": "string",
              "description": "Response header with the trace id."
            }
          }
        },
        "health": {
          "type": "object",
          "description": "Health check endpoint.",
          "properties": {
            "url": {
              "type": "string",
              "description": "Path of the health check endpoint."
            },
            "method": {
              "type": "string",
              "description": "Method of the health check endpoint.",
              "enum": [
                "GET",
                "POST",
                "PUT",
                "PATCH",
                "DELETE",
                "HEAD",
                "OPTIONS"
              ]
            }
          }
        },
        "route": {
          "type": "object",
          "description": "Routing.",
          "properties": {
            "cacheSize": {
              "type": "integer",
              "description": "Number of resolved routes kept in memory."
            }
          }
        },
        "body": {
          "type": "object",
          "description": "How request bodies are read.",
          "properties": {
            "limit": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ],
              "description": "Largest body, in bytes or as '100kb', '5mb'. Default '100kb'."
            },
            "inflate": {
              "type": "boolean",
              "description": "Decompress gzip, deflate and br bodies. Default true."
            },
            "strict": {
              "type": "boolean",
              "description": "JSON bodies must be an object or an array. Default true."
            },
            "parameterLimit": {
              "type": "integer",
              "description": "Most parameters in a form body. Default 1000."
            },
            "depth": {
              "type": "integer",
              "description": "Most levels of a[b][c] nesting in a form body. Default 32."
            }
          }
        },
        "cors": {
          "type": "object",
          "description": "CORS headers, with the options of the cors package of express; unset: any origin (*).",
          "properties": {
            "origin": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ],
              "description": "'*' (default): any origin; a string: that origin; true: the origin of the request; false: no CORS headers."
            },
            "methods": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ],
              "description": "Default GET,HEAD,PUT,PATCH,POST,DELETE."
            },
            "allowedHeaders": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "headers": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ],
              "description": "Alias of allowedHeaders."
            },
            "exposedHeaders": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "credentials": {
              "type": "boolean"
            },
            "maxAge": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ],
              "description": "Seconds."
            },
            "preflightContinue": {
              "type": "boolean"
            },
            "optionsSuccessStatus": {
              "type": "integer"
            }
          }
        },
        "errors": {
          "type": "object",
          "description": "Error responses.",
          "properties": {
            "exposeMessages": {
              "type": "boolean",
              "description": "Send the message of server errors (500 and HttpErrors without expose) to the client; default: only when NODE_ENV is not production. 4xx HttpError messages are always sent."
            }
          }
        }
      }
    }
  }
}
