Kratos · Schema

Kratos Service Configuration

JSON Schema for Kratos microservice framework configuration (kratos.yaml / config.yaml).

Cloud-NativeFrameworksGogRPCMicroservicesProtocol BuffersService Discovery

Properties

Name Type Description
server object
data object
registry object
trace object
log object
View JSON Schema on GitHub

JSON Schema

kratos-configuration.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/api-evangelist/kratos/json-schema/kratos-configuration.json",
  "title": "Kratos Service Configuration",
  "description": "JSON Schema for Kratos microservice framework configuration (kratos.yaml / config.yaml).",
  "type": "object",
  "properties": {
    "server": {
      "type": "object",
      "properties": {
        "http": {
          "$ref": "#/$defs/ServerConfig"
        },
        "grpc": {
          "$ref": "#/$defs/ServerConfig"
        }
      }
    },
    "data": {
      "type": "object",
      "properties": {
        "database": {
          "type": "object",
          "properties": {
            "driver": {
              "type": "string",
              "description": "Database driver name."
            },
            "source": {
              "type": "string",
              "description": "Database connection string."
            }
          }
        },
        "redis": {
          "type": "object",
          "properties": {
            "addr": {
              "type": "string",
              "description": "Redis server address."
            },
            "dial_timeout": {
              "type": "string",
              "description": "Dial timeout duration."
            },
            "read_timeout": {
              "type": "string",
              "description": "Read timeout duration."
            },
            "write_timeout": {
              "type": "string",
              "description": "Write timeout duration."
            }
          }
        }
      }
    },
    "registry": {
      "type": "object",
      "properties": {
        "consul": {
          "type": "object",
          "properties": {
            "address": {
              "type": "string",
              "description": "Consul server address."
            },
            "scheme": {
              "type": "string",
              "default": "http"
            }
          }
        },
        "etcd": {
          "type": "object",
          "properties": {
            "endpoints": {
              "type": "array",
              "items": { "type": "string" },
              "description": "Etcd endpoints."
            }
          }
        }
      }
    },
    "trace": {
      "type": "object",
      "properties": {
        "endpoint": {
          "type": "string",
          "description": "Tracing collector endpoint."
        },
        "sampler": {
          "type": "number",
          "description": "Sampling rate (0.0 to 1.0)."
        }
      }
    },
    "log": {
      "type": "object",
      "properties": {
        "level": {
          "type": "string",
          "enum": ["DEBUG", "INFO", "WARN", "ERROR", "FATAL"],
          "description": "Log level."
        }
      }
    }
  },
  "$defs": {
    "ServerConfig": {
      "type": "object",
      "properties": {
        "addr": {
          "type": "string",
          "description": "Server listen address (e.g., 0.0.0.0:8000)."
        },
        "timeout": {
          "type": "string",
          "description": "Server timeout duration."
        },
        "middleware": {
          "type": "object",
          "properties": {
            "logging": {
              "type": "boolean",
              "description": "Enable logging middleware."
            },
            "recovery": {
              "type": "boolean",
              "description": "Enable recovery middleware."
            },
            "tracing": {
              "type": "boolean",
              "description": "Enable tracing middleware."
            },
            "metrics": {
              "type": "boolean",
              "description": "Enable metrics middleware."
            }
          }
        },
        "tls": {
          "type": "object",
          "properties": {
            "cert_file": {
              "type": "string",
              "description": "Path to TLS certificate file."
            },
            "key_file": {
              "type": "string",
              "description": "Path to TLS key file."
            }
          }
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/kratos-configuration"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.