{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wimsta-com/json-schema/wimsta-com-formula-schema.json",
  "title": "Formula",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/wimsta-com-api-openapi.json#/components/schemas/Formula",
  "type": "object",
  "required": [
    "id",
    "name",
    "category",
    "equation",
    "source"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "equation": {
      "type": "string",
      "description": "Human-readable equation"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "source": {
      "type": "object",
      "properties": {
        "authors": {
          "type": "string"
        },
        "year": {
          "type": "integer"
        },
        "journal": {
          "type": "string"
        },
        "doi": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "sample": {
      "type": "object",
      "description": "Derivation sample",
      "additionalProperties": true
    },
    "error": {
      "type": "object",
      "description": "Reported error of the equation",
      "additionalProperties": true
    },
    "verification": {
      "type": "string",
      "description": "How the coefficients were checked against the source"
    },
    "independent_derivation": {
      "type": "boolean"
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "canonical_page": {
      "type": "string",
      "format": "uri"
    },
    "coefficients": {
      "type": "object",
      "description": "Coefficients keyed by term; values are numbers, or nested objects for sex-specific equations",
      "additionalProperties": true
    },
    "sex_coding": {
      "type": "string"
    },
    "units": {
      "type": "string"
    }
  }
}