All Downloads are FREE. Search and download functionalities are using the official Maven repository.

specification.jsonschema.correlation-transformer.json Maven / Gradle / Ivy

The newest version!
{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "$id": "https://www.metaeffekt.com/schema/artifact-analysis/latest/correlation-transformer.json",
  "title": "Correlation Transformation Instruction",
  "description": "Schema for a single transformation instruction used in artifact correlation transformation.",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "Type of the transformation instruction.",
      "enum": [
        "RenameOperation",
        "SetFieldOperation",
        "RemoveFieldOperation",
        "ReplaceFieldOperation"
      ]
    },
    "artifactFilter": {
      "type": "array",
      "description": "List of artifacts that at least one of must match against a correlation entry for the transformation to be applied.",
      "items": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "type"
  ],
  "oneOf": [
    {
      "properties": {
        "type": {
          "const": "RenameOperation"
        },
        "selectionPath": {
          "type": "string",
          "description": "Path to the field to be renamed."
        },
        "newName": {
          "type": "string",
          "description": "New name for the field."
        }
      },
      "required": [
        "selectionPath",
        "newName"
      ]
    },
    {
      "properties": {
        "type": {
          "const": "SetFieldOperation"
        },
        "selectionPath": {
          "type": "string",
          "description": "Path to the field to set."
        },
        "fieldValue": {
          "type": "string",
          "description": "Value to set for the field."
        },
        "addIfNotPresent": {
          "type": "boolean",
          "description": "Whether to add the field if it does not exist."
        }
      },
      "required": [
        "selectionPath",
        "fieldValue",
        "addIfNotPresent"
      ]
    },
    {
      "properties": {
        "type": {
          "const": "RemoveOperation"
        },
        "selectionPath": {
          "type": "string",
          "description": "Path to the field to remove."
        }
      },
      "required": [
        "selectionPath"
      ]
    },
    {
      "properties": {
        "type": {
          "const": "ReplaceOperation"
        },
        "selectionPath": {
          "type": "string",
          "description": "Path to the field to modify."
        },
        "pattern": {
          "type": "string",
          "description": "Regular expression pattern to match in the field value."
        },
        "replacement": {
          "type": "string",
          "description": "Replacement string for matched patterns."
        }
      },
      "required": [
        "selectionPath",
        "pattern",
        "replacement"
      ]
    }
  ],
  "additionalProperties": false
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy