{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/emporix/main/json-schema/emporix-conversion-factor-response-schema.json",
  "title": "ConversionFactorResponse",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/emporix-unit-handling-service-openapi.yml#/components/schemas/ConversionFactorResponse",
  "type": "object",
  "properties": {
    "commandUuid": {
      "type": "string"
    },
    "input": {
      "$ref": "#/$defs/ConversionFactorInput"
    },
    "output": {
      "$ref": "#/$defs/ConversionFactorOutput"
    }
  },
  "$defs": {
    "ConversionFactorInput": {
      "description": "The input is the conversion parameters object containing the source unit code, target unit code, and the amount to convert (amount required for convert-unit, optional for conversion-factor).",
      "type": "object",
      "properties": {
        "sourceUnitAmount": {
          "type": "number"
        },
        "sourceUnit": {
          "type": "string",
          "description": "The source unit code."
        },
        "targetUnit": {
          "type": "string",
          "description": "The target unit code."
        }
      },
      "required": [
        "sourceUnit",
        "targetUnit"
      ]
    },
    "ConversionFactorOutput": {
      "description": "Output payload",
      "properties": {
        "conversionFactor": {
          "type": "number",
          "description": "The conversion factor."
        }
      }
    }
  }
}