{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/mechanical.beam.deflection/1.1.0/input.json",
  "title": "Mechanical beam deflection (shared contract) — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "support": {
      "type": "string",
      "enum": [
        "simply_supported",
        "cantilever",
        "overhang"
      ],
      "description": "v1.1: simply_supported, cantilever, or overhang."
    },
    "L": {
      "type": "number",
      "description": "Span / length. Alias span, length."
    },
    "overhang": {
      "type": "number",
      "description": "Overhang length beyond the right support. Required when support is overhang. Alias a on leaf Entry prefills."
    },
    "E": {
      "type": "number",
      "description": "Elastic modulus. Alias youngs, modulus."
    },
    "I": {
      "type": "number",
      "description": "Area moment. Alias Ix, inertia."
    },
    "loads": {
      "type": "array",
      "minItems": 1,
      "description": "Load cases. paired and moment.end=both are public sugar; engine normalizes.",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "type"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "point",
              "uniform",
              "triangular",
              "moment",
              "paired"
            ]
          },
          "P": {
            "type": "number"
          },
          "a": {
            "type": "number",
            "description": "Point/paired position, or uniform segment start, or unloaded length for outer uniform."
          },
          "w": {
            "type": "number"
          },
          "w0": {
            "type": "number"
          },
          "M": {
            "type": "number"
          },
          "end": {
            "type": "string",
            "enum": [
              "left",
              "right",
              "tip",
              "both"
            ]
          },
          "peak": {
            "type": "string",
            "enum": [
              "right",
              "left",
              "center",
              "ends",
              "wall",
              "tip"
            ],
            "description": "Triangular peak. SS: right/left/center/ends. Cantilever: wall/tip."
          },
          "b": {
            "type": "number",
            "description": "Uniform segment end. Cantilever: [0,b] partial-from-wall; [a,L] outer."
          }
        }
      }
    },
    "query": {
      "description": "Object preferred; legacy string kind also accepted by the engine.",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "tip",
                "midspan",
                "at_x",
                "under_load",
                "max"
              ]
            },
            "x": {
              "type": "number"
            },
            "load_id": {
              "type": "string"
            }
          }
        },
        {
          "type": "string",
          "enum": [
            "tip",
            "midspan",
            "at_x",
            "under_load",
            "max"
          ]
        }
      ]
    }
  },
  "required": [
    "support",
    "loads",
    "query",
    "L",
    "E",
    "I"
  ],
  "description": "Shared Euler–Bernoulli deflection Capability. Delegates to Layer-A primitives. See docs/platform/MECHANICAL_BEAM_COLLAPSE.md. (calculation_version 1.1.0)"
}
