{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/invowerk-dev/json-schema/invowerk-dev-convert-response-schema.json",
  "title": "ConvertResponse",
  "description": "The answer of POST /v1/convert?format=json: the XML and the check result.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/invowerk-dev-openapi.yml#/components/schemas/ConvertResponse",
  "properties": {
    "syntax": {
      "type": "string",
      "title": "Syntax",
      "description": "The syntax of the XML: 'ubl' or 'cii'."
    },
    "flavor": {
      "type": "string",
      "title": "Flavor",
      "description": "The rule set of the XML: 'en16931' or 'xrechnung'."
    },
    "self_validation": {
      "$ref": "#/$defs/ConvertSelfValidation",
      "description": "The result of invowerk's own check of the XML."
    }
  },
  "type": "object",
  "required": [
    "xml",
    "syntax",
    "flavor",
    "self_validation"
  ],
  "$defs": {
    "ConvertSelfValidation": {
      "properties": {
        "valid": {
          "type": "boolean",
          "title": "Valid",
          "description": "Always true. An invalid result returns HTTP 500 instead."
        },
        "finding_count": {
          "type": "integer",
          "title": "Finding Count",
          "description": "Number of findings of the check; all of them are non-fatal."
        }
      },
      "type": "object",
      "required": [
        "valid",
        "finding_count"
      ],
      "title": "ConvertSelfValidation",
      "description": "The result of invowerk's own check of the converted XML.\n\nIt shows that the XML passed the check before it was returned. An invalid\nresult returns HTTP 500 instead."
    }
  }
}