specification.jsonschema.curated-versions-matching.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/curated-versions-matching.json",
"title": "Curated Version Matching data",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"pattern": {
"type": "string"
},
"pattern-flags": {
"type": "string"
},
"context": {
"type": "object",
"additionalProperties": false,
"properties": {
"cpe": {
"type": "array",
"items": {
"type": "string"
}
},
"vulnerability": {
"type": "array",
"items": {
"type": "string"
}
},
"eolIds": {
"type": "array",
"items": {
"type": "string"
}
},
"ghsaProducts": {
"type": "array",
"items": {
"type": "string"
}
},
"artifact": {
"type": "object",
"$ref": "artifact-data.json#/$defs/matcher"
}
}
},
"functions": {
"type": "array",
"items": {
"$ref": "#/$defs/function"
}
},
"segments": {
"type": "object",
"description": "Do not use in combination with 'preprocessor'. These replacement patterns are used as values for the segments.",
"additionalProperties": false,
"properties": {
"spec": {
"type": "string"
},
"sem": {
"type": "string"
},
"build": {
"type": "string"
},
"modifier": {
"type": "string"
},
"other": {
"type": "string"
},
"after-all": {
"type": "string"
}
}
},
"preprocessor": {
"type": "string",
"description": "Do not use in combination with 'segments'. The replacement pattern that is used as input for the further tokenization."
}
},
"allOf": [
{
"if": {
"properties": {
"pattern-flags": {
"type": "string"
}
},
"required": [
"pattern-flags"
]
},
"then": {
"required": [
"pattern"
]
}
},
{
"if": {
"properties": {
"segments": {
"type": "object"
}
},
"required": [
"segments"
]
},
"then": {
"required": [
"pattern"
],
"not": {
"required": [
"preprocessor"
]
}
}
},
{
"if": {
"properties": {
"preprocessor": {
"type": "string"
}
},
"required": [
"preprocessor"
]
},
"then": {
"required": [
"pattern"
],
"not": {
"required": [
"segments"
]
}
}
},
{
"anyOf": [
{
"required": [
"preprocessor"
]
},
{
"required": [
"segments"
]
},
{
"required": [
"functions"
]
}
]
}
]
},
"$defs": {
"function": {
"type": "object",
"properties": {
"function": {
"type": "string",
"enum": [
"segments_count",
"fill_empty",
"clear_if_matches",
"replace",
"replace_regex"
]
},
"part": {
"$ref": "#/$defs/partsString"
}
},
"required": [
"function",
"part"
],
"allOf": [
{
"if": {
"properties": {
"function": {
"const": "segments_count"
}
}
},
"then": {
"properties": {
"segments": {
"type": "number"
},
"expandValue": {
"type": "string"
},
"reduce": {
"type": "boolean",
"default": false
},
"expand": {
"type": "boolean",
"default": true
}
},
"required": [
"segments",
"expandValue"
]
}
},
{
"if": {
"properties": {
"function": {
"const": "fill_empty"
}
}
},
"then": {
"properties": {
"value": {
"type": "string"
}
},
"required": [
"value"
]
}
},
{
"if": {
"properties": {
"function": {
"const": "clear_if_matches"
}
}
},
"then": {
"properties": {
"find": {
"type": "string"
}
},
"required": [
"find"
]
}
},
{
"if": {
"oneOf": [
{
"properties": {
"function": {
"const": "replace"
}
}
},
{
"properties": {
"function": {
"const": "replace_regex"
}
}
}
]
},
"then": {
"properties": {
"find": {
"type": "string"
},
"replace": {
"type": "string"
}
},
"required": [
"find",
"replace"
]
}
}
]
},
"partsString": {
"type": "string",
"enum": [
"spec",
"sem",
"build",
"modifier",
"other",
"after-all"
]
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy