{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/ogen/_shared/latest--ogen.jsonschema.json",
  "title": "Ogen Configuration Schema",
  "description": "JSON Schema for ogen code generator configuration. See <https://ogen.dev/docs/config>.",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/ogen-go/ogen/main/schemas/ogen.jsonschema.json",
    "sourceSha256": "0485258b9b575f92949750d4638e0ab1319ae8ec441cd9757ac7d62eaff9c3e8"
  },
  "type": "object",
  "properties": {
    "parser": {
      "type": "object",
      "properties": {
        "infer_types": {
          "type": "boolean",
          "description": "Enables type inference for schemas. Schema parser will try to detect schema type by its properties.\n",
          "default": false
        },
        "allow_remote": {
          "type": "boolean",
          "description": "Enables remote references resolving. See <https://github.com/ogen-go/ogen/issues/385>.\n",
          "default": false
        },
        "depth_limit": {
          "type": "integer",
          "description": "Maximum depth of schema generation.",
          "minimum": 1,
          "default": 1000
        },
        "authentication_schemes": {
          "type": "array",
          "description": "Allowed HTTP Authorization schemes in a Security Scheme Object. If empty, the ones registered in <https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml> are used.\n",
          "items": {
            "type": "string",
            "enum": [
              "basic",
              "bearer",
              "concealed",
              "digest",
              "dpop",
              "gnap",
              "hoba",
              "mutual",
              "negotiate",
              "oauth",
              "privatetoken",
              "scram-sha-1",
              "scram-sha-256",
              "vapid"
            ]
          },
          "default": [
            "basic",
            "bearer",
            "concealed",
            "digest",
            "dpop",
            "gnap",
            "hoba",
            "mutual",
            "negotiate",
            "oauth",
            "privatetoken",
            "scram-sha-1",
            "scram-sha-256",
            "vapid"
          ]
        },
        "allow_cross_type_constraints": {
          "type": "boolean",
          "description": "Enables interpretation of cross-type schema constraints. When enabled, constraints like pattern on numbers or maximum on strings are allowed and interpreted during code generation.\n",
          "default": true
        },
        "disallow_duplicate_method_paths": {
          "type": "boolean",
          "description": "Enables strict duplicate normalized path checks. When enabled, duplicate normalized paths are always rejected per strict OpenAPI interpretation. Otherwise, paths with different parameter names and different HTTP methods are allowed, and operations are disambiguated by path + params + method.\n",
          "default": false
        }
      },
      "description": "Parser configuration options.",
      "additionalProperties": false
    },
    "generator": {
      "type": "object",
      "properties": {
        "features": {
          "type": "object",
          "properties": {
            "enable": {
              "type": "array",
              "description": "Features to enable. Applied after disable list, so entries here take priority.\n",
              "items": {
                "type": "string",
                "enum": [
                  "paths/client",
                  "paths/server",
                  "webhooks/client",
                  "webhooks/server",
                  "client/security/reentrant",
                  "client/request/options",
                  "client/request/validation",
                  "client/editors",
                  "server/response/validation",
                  "ogen/otel",
                  "ogen/unimplemented",
                  "debug/example_tests"
                ],
                "enumDescriptions": [
                  "Generate client code for API paths.",
                  "Generate server code for API paths.",
                  "Generate client code for webhooks.",
                  "Generate server code for webhooks.",
                  "Allow security source implementations to receive and use the generated client.",
                  "Generate per-request option functions for client requests.",
                  "Enable client request validation before sending.",
                  "Generate client request editor option functions.",
                  "Enable server response validation.",
                  "Enable OpenTelemetry integration.",
                  "Generate stub handlers for unimplemented operations.",
                  "Generate debug example tests."
                ]
              },
              "default": [
                "paths/client",
                "paths/server",
                "webhooks/client",
                "webhooks/server",
                "ogen/otel",
                "ogen/unimplemented"
              ]
            },
            "disable": {
              "type": "array",
              "description": "Features to disable. Applied before enable list, so entries in enable list take priority.\n",
              "items": {
                "type": "string",
                "enum": [
                  "paths/client",
                  "paths/server",
                  "webhooks/client",
                  "webhooks/server",
                  "client/security/reentrant",
                  "client/request/options",
                  "client/request/validation",
                  "client/editors",
                  "server/response/validation",
                  "ogen/otel",
                  "ogen/unimplemented",
                  "debug/example_tests"
                ],
                "enumDescriptions": [
                  "Disable client code generation for API paths.",
                  "Disable server code generation for API paths.",
                  "Disable client code generation for webhooks.",
                  "Disable server code generation for webhooks.",
                  "Disable passing the generated client to security source callbacks.",
                  "Disable per-request option functions for client requests.",
                  "Disable client request validation before sending.",
                  "Disable client request editor option functions.",
                  "Disable server response validation.",
                  "Disable OpenTelemetry integration.",
                  "Disable stub handlers for unimplemented operations.",
                  "Disable debug example tests."
                ]
              },
              "default": []
            },
            "disable_all": {
              "type": "boolean",
              "description": "Start from an empty feature set instead of default features before applying disable and enable lists.\n",
              "default": false
            }
          },
          "description": "Generator features configuration.",
          "additionalProperties": false
        },
        "filters": {
          "type": "object",
          "properties": {
            "path_regex": {
              "type": "string",
              "description": "Regular expression to filter paths. If empty, all paths are accepted.\n",
              "default": ""
            },
            "methods": {
              "type": "array",
              "description": "HTTP methods to keep. If empty, all methods are accepted.\n",
              "items": {
                "type": "string",
                "enum": [
                  "GET",
                  "POST",
                  "PUT",
                  "PATCH",
                  "DELETE",
                  "HEAD",
                  "OPTIONS",
                  "TRACE"
                ]
              },
              "default": []
            }
          },
          "description": "Operation filtering configuration options.",
          "additionalProperties": false
        },
        "ignore_not_implemented": {
          "type": "array",
          "description": "Functions that are not yet implemented and should be skipped during generation. \"all\" is a special list value that skips all not-implemented functions.\n",
          "items": {
            "type": "string"
          },
          "default": []
        },
        "convenient_errors": {
          "type": "string",
          "description": "Controls convenient error helper generation. See <https://ogen.dev/docs/concepts/convenient_errors>.\n",
          "enum": [
            "on",
            "off",
            "auto"
          ],
          "enumDescriptions": [
            "Force convenient error helper generation, it will fail if no common error pattern can be found.",
            "Disable convenient error helper generation.",
            "Generate convenient error helpers automatically when a common error pattern can be found."
          ],
          "default": "auto"
        },
        "content_type_aliases": {
          "type": "object",
          "description": "Maps exact content types to known encodings.",
          "default": {},
          "additionalProperties": {
            "type": "string"
          }
        },
        "wildcard_content_type_default": {
          "type": "string",
          "description": "Default encoding to use for wildcard content types (e.g. */* or application/*) when the schema is not binary. If empty, wildcard content types are treated as unsupported.\n",
          "default": ""
        }
      },
      "description": "Generator configuration options.",
      "additionalProperties": false
    },
    "expand": {
      "type": "string",
      "description": "Path to write the expanded OpenAPI spec file. If empty, the expanded spec is not written.\n",
      "default": ""
    }
  },
  "$comment": "This file is generated, edits should be made in https://github.com/ogen-go/ogen/blob/main/schemas/ogen.jsonschema.yml.",
  "additionalProperties": false
}
