{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "ERiC C response (supports ERiC and Otto usecases)",
    "version": "1.0.0",
    "type": "object",
    "additionalProperties": false,
    "required": [
      "exitCode",
      "message",
      "pathStorage",
      "pathXmlWithHeader",
      "pathOutputFile",
      "timestamp",
      "ericCode",
      "ericMessage",
      "processResult",
      "serverResponse",
      "otherOutput"
    ],
    "properties": {
      "$schema": {
        "type": "string",
        "description": "Optional hint for editors; allowed here so instance files can include it."
      },
      "exitCode": {
        "type": "string",
        "pattern": "^[0-9]+$",
        "examples": ["0", "101"]
      },
      "message": {
        "type": "string",
        "minLength": 1,
        "examples": [
          "OK",
          "Could not initialize an ERiC instance. Check eric.log for details."
        ]
      },
      "pathStorage": {
        "type": "string",
        "minLength": 1
      },
      "pathXmlWithHeader": {
        "type": "string",
        "minLength": 1
      },
      "pathOutputFile": {
        "type": "string",
        "minLength": 1
      },
      "timestamp": {
        "type": "string",
        "pattern": "^[0-9]{18}$",
        "description": "Format: YYYYMMDDHHmmsszzzz"
      },
      "ericCode": {
        "type": "string",
        "pattern": "^[0-9]+$",
        "examples": [
          "0",
          "610001002",
          "610001003"
        ]
      },
      "ericMessage": {
        "type": "string",
        "minLength": 1,
        "examples": [
          "Verarbeitung fehlerfrei.",
          "Fehler während der Plausibilitätsprüfung, Datensatz nicht plausibel. Zur Ermittlung der fehlgeschlagenen Plausibilitätsprüfungen muss der Rückgabepuffer (Parameter \"rueckgabeXmlPuffer\") ausgewertet werden.",
          "Hinweise während der Plausibilitätsprüfung, Datensatz ist aber plausibel. Zur Ermittlung der anzuzeigenden Hinweise muss der Rückgabepuffer (Parameter \"rueckgabeXmlPuffer\") ausgewertet werden."
        ]
      },
      "processResult": {
        "type": "string",
        "minLength": 1
      },
      "serverResponse": {
        "type": "string",
        "minLength": 1
      },
      "otherOutput": {
        "type": "string",
        "minLength": 1
      }
    },
    "examples": [
      {
        "exitCode": "0",
        "message": "OK",
        "pathStorage": "/path/to/storage",
        "pathXmlWithHeader": "/path/to/file.xml",
        "pathOutputFile": "/path/to/storage/print-202508011027010200.pdf",
        "timestamp": "202508011027010200",
        "ericCode": "0",
        "ericMessage": "Verarbeitung fehlerfrei.",
        "processResult": "<XML/>",
        "serverResponse": "<ELSTER />",
        "otherOutput": "Text output from ceric"
      },
      {
        "exitCode": "0",
        "message": "OK",
        "pathStorage": "/path/to/storage",
        "pathXmlWithHeader": null,
        "pathOutputFile": "/path/to/storage/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee.xml",
        "timestamp": null,
        "ericCode": "0",
        "ericMessage": "Die Verarbeitung ist ordnungsgemäß abgeschlossen worden.",
        "processResult": null,
        "serverResponse": null,
        "otherOutput": null
      }
    ]
  }
