addedInput schema / additionalProperties
Added value: +false
addedInput schema / properties / a
Added value: +{
+ "description": "First proportion term (solveProportion only). Provide exactly three of a, b, c, d, each greater than zero, and omit the one to solve for.",
+ "type": "number"
+}
addedInput schema / properties / anchor
Added value: +{
+ "additionalProperties": false,
+ "description": "Anchor for the scale operation (required for scale, ignored otherwise): pin one part to a target value and scale the rest.",
+ "properties": {
+ "index": {
+ "description": "Zero-based index of the part to anchor; must be within the parts array.",
+ "minimum": 0,
+ "type": "integer"
+ },
+ "value": {
+ "description": "Target value the anchored part should become; the scale factor is value divided by the original part.",
+ "type": "number"
+ }
+ },
+ "type": "object"
+}
addedInput schema / properties / b
Added value: +{
+ "description": "Second proportion term (solveProportion only). Provide exactly three of a, b, c, d and omit the one to solve for.",
+ "type": "number"
+}
addedInput schema / properties / c
Added value: +{
+ "description": "Third proportion term (solveProportion only). Provide exactly three of a, b, c, d and omit the one to solve for.",
+ "type": "number"
+}
addedInput schema / properties / d
Added value: +{
+ "description": "Fourth proportion term (solveProportion only). Provide exactly three of a, b, c, d and omit the one to solve for.",
+ "type": "number"
+}
addedInput schema / properties / operation / description
Added value: +"Mode selector. simplify, scale, split, and percentage read the parts array; solveProportion reads a, b, c, d instead."
addedInput schema / properties / operation / enum
Added value: +[
+ "simplify",
+ "solveProportion",
+ "scale",
+ "split",
+ "percentage"
+]
addedInput schema / properties / parts / description
Added value: +"Ratio terms for simplify, scale, split, and percentage (ignored by solveProportion). 2 to 8 finite numbers greater than zero; numeric strings are coerced. simplify additionally requires every value to be a positive integer."
changedInput schema / properties / parts / items / type
Previous value: -"integer"New value: +"number"
addedInput schema / properties / parts / maxItems
Added value: +8
addedInput schema / properties / parts / minItems
Added value: +2
addedInput schema / properties / total
Added value: +{
+ "description": "Total to distribute across parts for the split operation (required for split, ignored otherwise). Each rounded allocation is proportional to its part.",
+ "type": "number"
+}
changedInput schema / required
Previous value: -[
- "operation",
- "parts"
-]New value: +[
+ "operation"
+]
changedOutput schema / (root)
Previous value: -nullNew value: +{
+ "properties": {
+ "error": {
+ "description": "Present only on failure (HTTP 400/500) with the validation message; omitted on success.",
+ "type": "string"
+ },
+ "operation": {
+ "description": "The operation that was executed (echoed from the request).",
+ "type": "string"
+ },
+ "result": {
+ "description": "Operation-specific output. simplify returns input, simplified, gcd. solveProportion returns a, b, c, d, unknown, equation. scale returns input, scaled, anchor (index, value), factor. split returns total, parts, allocations, rounded, rounding. percentage returns parts, percentages, total.",
+ "properties": {
+ "a": {
+ "description": "Resolved first proportion term (solveProportion).",
+ "type": "number"
+ },
+ "allocations": {
+ "description": "Exact unrounded proportional allocations of the total (split).",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "anchor": {
+ "description": "The anchor that was applied (scale).",
+ "properties": {
+ "index": {
+ "description": "Zero-based index of the anchored part.",
+ "type": "integer"
+ },
+ "value": {
+ "description": "Target value the anchored part was set to.",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "b": {
+ "description": "Resolved second proportion term (solveProportion).",
+ "type": "number"
+ },
+ "c": {
+ "description": "Resolved third proportion term (solveProportion).",
+ "type": "number"
+ },
+ "d": {
+ "description": "Resolved fourth proportion term (solveProportion).",
+ "type": "number"
+ },
+ "equation": {
+ "description": "The solved proportion rendered as a over b equals c over d (solveProportion).",
+ "type": "string"
+ },
+ "factor": {
+ "description": "Multiplier applied to every part (scale).",
+ "type": "number"
+ },
+ "gcd": {
+ "description": "Greatest common divisor of the input parts (simplify).",
+ "type": "integer"
+ },
+ "input": {
+ "description": "Validated input parts (simplify and scale).",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "parts": {
+ "description": "Validated input parts (split and percentage).",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "percentages": {
+ "description": "Each part as a percent of the whole (percentage).",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "rounded": {
+ "description": "Integer allocations via largest-remainder rounding (split).",
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "rounding": {
+ "description": "Rounding mode applied to the split allocations (always rounded).",
+ "type": "string"
+ },
+ "scaled": {
+ "description": "Parts after applying the scale factor (scale).",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "simplified": {
+ "description": "Parts reduced by their GCD (simplify).",
+ "items": {
+ "type": "number"
+ },
+ "type": "array"
+ },
+ "total": {
+ "description": "Echoed total (split) or sum of parts (percentage).",
+ "type": "number"
+ },
+ "unknown": {
+ "description": "Which term was solved for, one of a, b, c, or d (solveProportion).",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "success": {
+ "description": "True when the calculation succeeded.",
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+}