diff --git a/docs/docs.go b/docs/docs.go
index 7538dbaa..c44d47b5 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -1943,6 +1943,10 @@ const docTemplate = `{
"$ref": "#/definitions/result.Condition"
}
},
+ "consoleOutput": {
+ "description": "ConsoleOutput holds the end of the console output of the whole pipeline,\nincluding the output logged outside of any source, condition or target",
+ "type": "string"
+ },
"err": {
"type": "string"
},
@@ -1983,6 +1987,10 @@ const docTemplate = `{
"additionalProperties": {
"$ref": "#/definitions/result.Target"
}
+ },
+ "updatecliVersion": {
+ "description": "UpdatecliVersion is the version of Updatecli which produced the report",
+ "type": "string"
}
}
},
@@ -2014,7 +2022,7 @@ const docTemplate = `{
"description": "Config stores the source configuration"
},
"consoleOutput": {
- "description": "ConsoleOutput stores the console output of the condition execution",
+ "description": "ConsoleOutput stores the console output of the condition execution.\nIt may include lines from resources running at the same time.",
"type": "string"
},
"description": {
@@ -2100,7 +2108,7 @@ const docTemplate = `{
"description": "Config stores the source configuration"
},
"consoleOutput": {
- "description": "ConsoleOutput stores the console output of the source execution",
+ "description": "ConsoleOutput stores the console output of the source execution.\nIt may include lines from resources running at the same time.",
"type": "string"
},
"description": {
@@ -2151,7 +2159,7 @@ const docTemplate = `{
"description": "Config stores the source configuration"
},
"consoleOutput": {
- "description": "ConsoleOutput stores the console output of the target execution",
+ "description": "ConsoleOutput stores the console output of the target execution.\nIt may include lines from resources running at the same time.",
"type": "string"
},
"description": {
@@ -2762,18 +2770,18 @@ const docTemplate = `{
"type": "object",
"properties": {
"captureIndex": {
- "description": "CaptureIndex defines which substring occurrence to retrieve. Note also that a value of ` + "`" + `0` + "`" + ` for ` + "`" + `captureIndex` + "`" + ` returns all submatches, and individual submatch indexes start at ` + "`" + `1` + "`" + `.",
+ "description": "\"captureindex\" defines the capture group to return.\n\ndefault:\n 0\n\nremark:\n * 0 returns the whole match, and capture groups start at 1.\n * an index without a matching capture group returns an empty value.\n * ignored when \"capturepattern\" is set.\n\nexample:\n * captureindex: 1",
"type": "integer"
},
"capturePattern": {
- "description": "Uses the match group(s) to generate the output using \\0, \\1, \\2, etc",
+ "description": "\"capturepattern\" defines a template building the value from the capture groups.\n\nremark:\n * \\0 is replaced by the whole match, \\1 by the first capture group, \\2 by the second, and so on.\n * it takes precedence over \"captureindex\".\n\nexample:\n * capturepattern: \\1.\\2",
"type": "string"
},
"deprecatedCaptureIndex": {
"type": "integer"
},
"pattern": {
- "description": "Pattern defines regular expression to use for retrieving a submatch",
+ "description": "\"pattern\" defines the regular expression applied to the value.\n\nremark:\n * when nothing matches, the value becomes empty.\n\nexample:\n * pattern: 'v(\\d+)\\.(\\d+)'",
"type": "string"
}
}
@@ -2782,18 +2790,19 @@ const docTemplate = `{
"type": "object",
"properties": {
"joinMultipleMatches": {
- "description": "If we find multiple matches, join them by this",
+ "description": "\"joinmultiplematches\" defines the separator used to join the results when the query matches several values.\n\nremark:\n * it takes precedence over \"multiplematchselector\".\n * when both are empty, several matches make the transformer fail.\n\nexample:\n * joinmultiplematches: \",\"",
"type": "string"
},
"key": {
+ "description": "\"key\" defines the dasel query selecting the value in the json input.\n\nremark:\n * the query uses the dasel v2 selector syntax.\n\nexample:\n * key: .version\n * key: .tags.all()",
"type": "string"
},
"multipleMatchSelector": {
- "description": "If we find multiple matches, select the \"first\" or the \"last\"",
+ "description": "\"multiplematchselector\" defines which result to return when the query matches several values.\n\nremark:\n * accepted values are \"first\", \"last\", or an index such as \"[1]\".\n * a negative index counts from the end, so \"[-1]\" is the last result.\n * when both \"joinmultiplematches\" and \"multiplematchselector\" are empty, several matches make the transformer fail.\n\nexample:\n * multiplematchselector: first\n * multiplematchselector: \"[0]\"",
"type": "string"
},
"noMatchResult": {
- "description": "If we don't find a match then return the following string or the input value",
+ "description": "\"nomatchresult\" defines the value returned when the query matches nothing.\n\ndefault:\n empty, which makes the transformer fail when nothing matches.\n\nremark:\n * \"\u003cinput\u003e\" returns the transformer input.\n * \"\u003cblank\u003e\" returns an empty value.\n * any other value is returned as is.",
"type": "string"
}
}
@@ -2802,11 +2811,11 @@ const docTemplate = `{
"type": "object",
"properties": {
"from": {
- "description": "From defines the source value which need to be replaced",
+ "description": "\"from\" defines the text to replace.\n\nexample:\n * from: \"_\"",
"type": "string"
},
"to": {
- "description": "To defines the \"to what\" a \"from\" value needs to be replaced",
+ "description": "\"to\" defines the text replacing \"from\".\n\nexample:\n * to: \".\"",
"type": "string"
}
}
@@ -2815,11 +2824,11 @@ const docTemplate = `{
"type": "object",
"properties": {
"addPrefix": {
- "description": "AddPrefix adds a prefix to the transformer input value",
+ "description": "\"addprefix\" defines a prefix added to the value.\n\nexample:\n * addprefix: v",
"type": "string"
},
"addSuffix": {
- "description": "AddSuffix adds a suffix to the transformer input value",
+ "description": "\"addsuffix\" defines a suffix added to the value.\n\nexample:\n * addsuffix: -alpine",
"type": "string"
},
"deprecatedAddPrefix": {
@@ -2839,11 +2848,11 @@ const docTemplate = `{
"type": "string"
},
"find": {
- "description": "Find searches for a specific value if it exists and return false if it doesn't",
+ "description": "\"find\" defines a regular expression, and replaces the value with its first match.\n\nremark:\n * when nothing matches, the value becomes empty.\n\nexample:\n * find: \\d+\\.\\d+\\.\\d+",
"type": "string"
},
"findSubMatch": {
- "description": "Find searches for a specific value if it exists then return the value using regular expression",
+ "description": "\"findsubmatch\" defines a regular expression, and replaces the value with one of its capture groups.\n\nexample:\n ` + "`" + `` + "`" + `` + "`" + `\n findsubmatch:\n pattern: 'v(\\d+)\\.(\\d+)'\n captureindex: 1\n ` + "`" + `` + "`" + `` + "`" + `",
"allOf": [
{
"$ref": "#/definitions/transformer.FindSubMatch"
@@ -2851,14 +2860,19 @@ const docTemplate = `{
]
},
"jsonMatch": {
- "$ref": "#/definitions/transformer.JsonMatch"
+ "description": "\"jsonmatch\" defines a query extracting a value from a json input.\n\nexample:\n ` + "`" + `` + "`" + `` + "`" + `\n jsonmatch:\n key: .version\n ` + "`" + `` + "`" + `` + "`" + `",
+ "allOf": [
+ {
+ "$ref": "#/definitions/transformer.JsonMatch"
+ }
+ ]
},
"quote": {
- "description": "Quote add quote around the value",
+ "description": "\"quote\" wraps the value in double quotes.\n\ndefault:\n false\n\nremark:\n * special characters in the value are escaped, following Go string syntax.",
"type": "boolean"
},
"replacer": {
- "description": "Replacer specifies what value needs to be changed and how",
+ "description": "\"replacer\" defines a single replacement applied to the value.\n\nexample:\n ` + "`" + `` + "`" + `` + "`" + `\n replacer:\n from: \"_\"\n to: \".\"\n ` + "`" + `` + "`" + `` + "`" + `",
"allOf": [
{
"$ref": "#/definitions/transformer.Replacer"
@@ -2866,49 +2880,41 @@ const docTemplate = `{
]
},
"replacers": {
- "description": "Replacers specifies a list of replacer instruction",
+ "description": "\"replacers\" defines a list of replacements applied to the value.\n\nremark:\n * all replacements run in a single pass, so a replaced text is never replaced again.\n\nexample:\n ` + "`" + `` + "`" + `` + "`" + `\n replacers:\n - from: \"_\"\n to: \".\"\n - from: \"v\"\n to: \"\"\n ` + "`" + `` + "`" + `` + "`" + `",
"type": "array",
"items": {
"$ref": "#/definitions/transformer.Replacer"
}
},
"semVerInc": {
- "description": "SemvVerInc specifies a comma separated list semantic versioning component that needs to be upgraded.",
+ "description": "\"semverinc\" defines a comma separated list of semantic version components to increment.\n\nremark:\n * accepted components are \"major\", \"minor\" and \"patch\", applied in the order given.\n * the value must be a valid semantic version.\n * spaces around the commas are not accepted.\n\nexample:\n * semverinc: patch\n * semverinc: minor,patch",
"type": "string"
},
"trimPrefix": {
- "description": "TrimPrefix removes a prefix to the transformer input value",
+ "description": "\"trimprefix\" defines a prefix removed from the value.\n\nexample:\n * trimprefix: v",
"type": "string"
},
"trimSuffix": {
- "description": "TrimSuffix removes the suffix from the transformer input value",
+ "description": "\"trimsuffix\" defines a suffix removed from the value.\n\nexample:\n * trimsuffix: -alpine",
"type": "string"
},
"unquote": {
- "description": "Unquote remove quotes around the value",
+ "description": "\"unquote\" removes the double quotes around the value.\n\ndefault:\n false",
"type": "boolean"
}
}
}
- },
- "securityDefinitions": {
- "BearerAuth": {
- "description": "Either an Udash API token, created from the tokens page and prefixed with \"udash_pat_\", or an access token from the configured identity provider. Send it as \"Bearer \u003ctoken\u003e\".",
- "type": "apiKey",
- "name": "Authorization",
- "in": "header"
- }
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
- Version: "1.0",
+ Version: "",
Host: "",
BasePath: "",
Schemes: []string{},
- Title: "Udash API",
- Description: "API for managing Updatecli pipeline reports.",
+ Title: "",
+ Description: "",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
diff --git a/docs/swagger.json b/docs/swagger.json
index fd6ae273..d9f0829f 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -1,10 +1,7 @@
{
"swagger": "2.0",
"info": {
- "description": "API for managing Updatecli pipeline reports.",
- "title": "Udash API",
- "contact": {},
- "version": "1.0"
+ "contact": {}
},
"paths": {
"/api/": {
@@ -1935,6 +1932,10 @@
"$ref": "#/definitions/result.Condition"
}
},
+ "consoleOutput": {
+ "description": "ConsoleOutput holds the end of the console output of the whole pipeline,\nincluding the output logged outside of any source, condition or target",
+ "type": "string"
+ },
"err": {
"type": "string"
},
@@ -1975,6 +1976,10 @@
"additionalProperties": {
"$ref": "#/definitions/result.Target"
}
+ },
+ "updatecliVersion": {
+ "description": "UpdatecliVersion is the version of Updatecli which produced the report",
+ "type": "string"
}
}
},
@@ -2006,7 +2011,7 @@
"description": "Config stores the source configuration"
},
"consoleOutput": {
- "description": "ConsoleOutput stores the console output of the condition execution",
+ "description": "ConsoleOutput stores the console output of the condition execution.\nIt may include lines from resources running at the same time.",
"type": "string"
},
"description": {
@@ -2092,7 +2097,7 @@
"description": "Config stores the source configuration"
},
"consoleOutput": {
- "description": "ConsoleOutput stores the console output of the source execution",
+ "description": "ConsoleOutput stores the console output of the source execution.\nIt may include lines from resources running at the same time.",
"type": "string"
},
"description": {
@@ -2143,7 +2148,7 @@
"description": "Config stores the source configuration"
},
"consoleOutput": {
- "description": "ConsoleOutput stores the console output of the target execution",
+ "description": "ConsoleOutput stores the console output of the target execution.\nIt may include lines from resources running at the same time.",
"type": "string"
},
"description": {
@@ -2754,18 +2759,18 @@
"type": "object",
"properties": {
"captureIndex": {
- "description": "CaptureIndex defines which substring occurrence to retrieve. Note also that a value of `0` for `captureIndex` returns all submatches, and individual submatch indexes start at `1`.",
+ "description": "\"captureindex\" defines the capture group to return.\n\ndefault:\n 0\n\nremark:\n * 0 returns the whole match, and capture groups start at 1.\n * an index without a matching capture group returns an empty value.\n * ignored when \"capturepattern\" is set.\n\nexample:\n * captureindex: 1",
"type": "integer"
},
"capturePattern": {
- "description": "Uses the match group(s) to generate the output using \\0, \\1, \\2, etc",
+ "description": "\"capturepattern\" defines a template building the value from the capture groups.\n\nremark:\n * \\0 is replaced by the whole match, \\1 by the first capture group, \\2 by the second, and so on.\n * it takes precedence over \"captureindex\".\n\nexample:\n * capturepattern: \\1.\\2",
"type": "string"
},
"deprecatedCaptureIndex": {
"type": "integer"
},
"pattern": {
- "description": "Pattern defines regular expression to use for retrieving a submatch",
+ "description": "\"pattern\" defines the regular expression applied to the value.\n\nremark:\n * when nothing matches, the value becomes empty.\n\nexample:\n * pattern: 'v(\\d+)\\.(\\d+)'",
"type": "string"
}
}
@@ -2774,18 +2779,19 @@
"type": "object",
"properties": {
"joinMultipleMatches": {
- "description": "If we find multiple matches, join them by this",
+ "description": "\"joinmultiplematches\" defines the separator used to join the results when the query matches several values.\n\nremark:\n * it takes precedence over \"multiplematchselector\".\n * when both are empty, several matches make the transformer fail.\n\nexample:\n * joinmultiplematches: \",\"",
"type": "string"
},
"key": {
+ "description": "\"key\" defines the dasel query selecting the value in the json input.\n\nremark:\n * the query uses the dasel v2 selector syntax.\n\nexample:\n * key: .version\n * key: .tags.all()",
"type": "string"
},
"multipleMatchSelector": {
- "description": "If we find multiple matches, select the \"first\" or the \"last\"",
+ "description": "\"multiplematchselector\" defines which result to return when the query matches several values.\n\nremark:\n * accepted values are \"first\", \"last\", or an index such as \"[1]\".\n * a negative index counts from the end, so \"[-1]\" is the last result.\n * when both \"joinmultiplematches\" and \"multiplematchselector\" are empty, several matches make the transformer fail.\n\nexample:\n * multiplematchselector: first\n * multiplematchselector: \"[0]\"",
"type": "string"
},
"noMatchResult": {
- "description": "If we don't find a match then return the following string or the input value",
+ "description": "\"nomatchresult\" defines the value returned when the query matches nothing.\n\ndefault:\n empty, which makes the transformer fail when nothing matches.\n\nremark:\n * \"\u003cinput\u003e\" returns the transformer input.\n * \"\u003cblank\u003e\" returns an empty value.\n * any other value is returned as is.",
"type": "string"
}
}
@@ -2794,11 +2800,11 @@
"type": "object",
"properties": {
"from": {
- "description": "From defines the source value which need to be replaced",
+ "description": "\"from\" defines the text to replace.\n\nexample:\n * from: \"_\"",
"type": "string"
},
"to": {
- "description": "To defines the \"to what\" a \"from\" value needs to be replaced",
+ "description": "\"to\" defines the text replacing \"from\".\n\nexample:\n * to: \".\"",
"type": "string"
}
}
@@ -2807,11 +2813,11 @@
"type": "object",
"properties": {
"addPrefix": {
- "description": "AddPrefix adds a prefix to the transformer input value",
+ "description": "\"addprefix\" defines a prefix added to the value.\n\nexample:\n * addprefix: v",
"type": "string"
},
"addSuffix": {
- "description": "AddSuffix adds a suffix to the transformer input value",
+ "description": "\"addsuffix\" defines a suffix added to the value.\n\nexample:\n * addsuffix: -alpine",
"type": "string"
},
"deprecatedAddPrefix": {
@@ -2831,11 +2837,11 @@
"type": "string"
},
"find": {
- "description": "Find searches for a specific value if it exists and return false if it doesn't",
+ "description": "\"find\" defines a regular expression, and replaces the value with its first match.\n\nremark:\n * when nothing matches, the value becomes empty.\n\nexample:\n * find: \\d+\\.\\d+\\.\\d+",
"type": "string"
},
"findSubMatch": {
- "description": "Find searches for a specific value if it exists then return the value using regular expression",
+ "description": "\"findsubmatch\" defines a regular expression, and replaces the value with one of its capture groups.\n\nexample:\n ```\n findsubmatch:\n pattern: 'v(\\d+)\\.(\\d+)'\n captureindex: 1\n ```",
"allOf": [
{
"$ref": "#/definitions/transformer.FindSubMatch"
@@ -2843,14 +2849,19 @@
]
},
"jsonMatch": {
- "$ref": "#/definitions/transformer.JsonMatch"
+ "description": "\"jsonmatch\" defines a query extracting a value from a json input.\n\nexample:\n ```\n jsonmatch:\n key: .version\n ```",
+ "allOf": [
+ {
+ "$ref": "#/definitions/transformer.JsonMatch"
+ }
+ ]
},
"quote": {
- "description": "Quote add quote around the value",
+ "description": "\"quote\" wraps the value in double quotes.\n\ndefault:\n false\n\nremark:\n * special characters in the value are escaped, following Go string syntax.",
"type": "boolean"
},
"replacer": {
- "description": "Replacer specifies what value needs to be changed and how",
+ "description": "\"replacer\" defines a single replacement applied to the value.\n\nexample:\n ```\n replacer:\n from: \"_\"\n to: \".\"\n ```",
"allOf": [
{
"$ref": "#/definitions/transformer.Replacer"
@@ -2858,37 +2869,29 @@
]
},
"replacers": {
- "description": "Replacers specifies a list of replacer instruction",
+ "description": "\"replacers\" defines a list of replacements applied to the value.\n\nremark:\n * all replacements run in a single pass, so a replaced text is never replaced again.\n\nexample:\n ```\n replacers:\n - from: \"_\"\n to: \".\"\n - from: \"v\"\n to: \"\"\n ```",
"type": "array",
"items": {
"$ref": "#/definitions/transformer.Replacer"
}
},
"semVerInc": {
- "description": "SemvVerInc specifies a comma separated list semantic versioning component that needs to be upgraded.",
+ "description": "\"semverinc\" defines a comma separated list of semantic version components to increment.\n\nremark:\n * accepted components are \"major\", \"minor\" and \"patch\", applied in the order given.\n * the value must be a valid semantic version.\n * spaces around the commas are not accepted.\n\nexample:\n * semverinc: patch\n * semverinc: minor,patch",
"type": "string"
},
"trimPrefix": {
- "description": "TrimPrefix removes a prefix to the transformer input value",
+ "description": "\"trimprefix\" defines a prefix removed from the value.\n\nexample:\n * trimprefix: v",
"type": "string"
},
"trimSuffix": {
- "description": "TrimSuffix removes the suffix from the transformer input value",
+ "description": "\"trimsuffix\" defines a suffix removed from the value.\n\nexample:\n * trimsuffix: -alpine",
"type": "string"
},
"unquote": {
- "description": "Unquote remove quotes around the value",
+ "description": "\"unquote\" removes the double quotes around the value.\n\ndefault:\n false",
"type": "boolean"
}
}
}
- },
- "securityDefinitions": {
- "BearerAuth": {
- "description": "Either an Udash API token, created from the tokens page and prefixed with \"udash_pat_\", or an access token from the configured identity provider. Send it as \"Bearer \u003ctoken\u003e\".",
- "type": "apiKey",
- "name": "Authorization",
- "in": "header"
- }
}
}
\ No newline at end of file
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 25fc7386..92006737 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -465,6 +465,11 @@ definitions:
additionalProperties:
$ref: '#/definitions/result.Condition'
type: object
+ consoleOutput:
+ description: |-
+ ConsoleOutput holds the end of the console output of the whole pipeline,
+ including the output logged outside of any source, condition or target
+ type: string
err:
type: string
graph:
@@ -493,6 +498,10 @@ definitions:
additionalProperties:
$ref: '#/definitions/result.Target'
type: object
+ updatecliVersion:
+ description: UpdatecliVersion is the version of Updatecli which produced the
+ report
+ type: string
type: object
result.Changelog:
properties:
@@ -515,7 +524,9 @@ definitions:
config:
description: Config stores the source configuration
consoleOutput:
- description: ConsoleOutput stores the console output of the condition execution
+ description: |-
+ ConsoleOutput stores the console output of the condition execution.
+ It may include lines from resources running at the same time.
type: string
description:
description: Description stores the condition execution description.
@@ -576,7 +587,9 @@ definitions:
config:
description: Config stores the source configuration
consoleOutput:
- description: ConsoleOutput stores the console output of the source execution
+ description: |-
+ ConsoleOutput stores the console output of the source execution.
+ It may include lines from resources running at the same time.
type: string
description:
description: Description stores the source execution description
@@ -614,7 +627,9 @@ definitions:
config:
description: Config stores the source configuration
consoleOutput:
- description: ConsoleOutput stores the console output of the target execution
+ description: |-
+ ConsoleOutput stores the console output of the target execution.
+ It may include lines from resources running at the same time.
type: string
description:
description: Description stores the target execution description
@@ -1180,51 +1195,126 @@ definitions:
transformer.FindSubMatch:
properties:
captureIndex:
- description: CaptureIndex defines which substring occurrence to retrieve.
- Note also that a value of `0` for `captureIndex` returns all submatches,
- and individual submatch indexes start at `1`.
+ description: |-
+ "captureindex" defines the capture group to return.
+
+ default:
+ 0
+
+ remark:
+ * 0 returns the whole match, and capture groups start at 1.
+ * an index without a matching capture group returns an empty value.
+ * ignored when "capturepattern" is set.
+
+ example:
+ * captureindex: 1
type: integer
capturePattern:
- description: Uses the match group(s) to generate the output using \0, \1,
- \2, etc
+ description: |-
+ "capturepattern" defines a template building the value from the capture groups.
+
+ remark:
+ * \0 is replaced by the whole match, \1 by the first capture group, \2 by the second, and so on.
+ * it takes precedence over "captureindex".
+
+ example:
+ * capturepattern: \1.\2
type: string
deprecatedCaptureIndex:
type: integer
pattern:
- description: Pattern defines regular expression to use for retrieving a submatch
+ description: |-
+ "pattern" defines the regular expression applied to the value.
+
+ remark:
+ * when nothing matches, the value becomes empty.
+
+ example:
+ * pattern: 'v(\d+)\.(\d+)'
type: string
type: object
transformer.JsonMatch:
properties:
joinMultipleMatches:
- description: If we find multiple matches, join them by this
+ description: |-
+ "joinmultiplematches" defines the separator used to join the results when the query matches several values.
+
+ remark:
+ * it takes precedence over "multiplematchselector".
+ * when both are empty, several matches make the transformer fail.
+
+ example:
+ * joinmultiplematches: ","
type: string
key:
+ description: |-
+ "key" defines the dasel query selecting the value in the json input.
+
+ remark:
+ * the query uses the dasel v2 selector syntax.
+
+ example:
+ * key: .version
+ * key: .tags.all()
type: string
multipleMatchSelector:
- description: If we find multiple matches, select the "first" or the "last"
+ description: |-
+ "multiplematchselector" defines which result to return when the query matches several values.
+
+ remark:
+ * accepted values are "first", "last", or an index such as "[1]".
+ * a negative index counts from the end, so "[-1]" is the last result.
+ * when both "joinmultiplematches" and "multiplematchselector" are empty, several matches make the transformer fail.
+
+ example:
+ * multiplematchselector: first
+ * multiplematchselector: "[0]"
type: string
noMatchResult:
- description: If we don't find a match then return the following string or
- the input value
+ description: |-
+ "nomatchresult" defines the value returned when the query matches nothing.
+
+ default:
+ empty, which makes the transformer fail when nothing matches.
+
+ remark:
+ * "" returns the transformer input.
+ * "" returns an empty value.
+ * any other value is returned as is.
type: string
type: object
transformer.Replacer:
properties:
from:
- description: From defines the source value which need to be replaced
+ description: |-
+ "from" defines the text to replace.
+
+ example:
+ * from: "_"
type: string
to:
- description: To defines the "to what" a "from" value needs to be replaced
+ description: |-
+ "to" defines the text replacing "from".
+
+ example:
+ * to: "."
type: string
type: object
transformer.Transformer:
properties:
addPrefix:
- description: AddPrefix adds a prefix to the transformer input value
+ description: |-
+ "addprefix" defines a prefix added to the value.
+
+ example:
+ * addprefix: v
type: string
addSuffix:
- description: AddSuffix adds a suffix to the transformer input value
+ description: |-
+ "addsuffix" defines a suffix added to the value.
+
+ example:
+ * addsuffix: -alpine
type: string
deprecatedAddPrefix:
type: string
@@ -1238,47 +1328,115 @@ definitions:
deprecatedTrimSuffix:
type: string
find:
- description: Find searches for a specific value if it exists and return false
- if it doesn't
+ description: |-
+ "find" defines a regular expression, and replaces the value with its first match.
+
+ remark:
+ * when nothing matches, the value becomes empty.
+
+ example:
+ * find: \d+\.\d+\.\d+
type: string
findSubMatch:
allOf:
- $ref: '#/definitions/transformer.FindSubMatch'
- description: Find searches for a specific value if it exists then return the
- value using regular expression
+ description: |-
+ "findsubmatch" defines a regular expression, and replaces the value with one of its capture groups.
+
+ example:
+ ```
+ findsubmatch:
+ pattern: 'v(\d+)\.(\d+)'
+ captureindex: 1
+ ```
jsonMatch:
- $ref: '#/definitions/transformer.JsonMatch'
+ allOf:
+ - $ref: '#/definitions/transformer.JsonMatch'
+ description: |-
+ "jsonmatch" defines a query extracting a value from a json input.
+
+ example:
+ ```
+ jsonmatch:
+ key: .version
+ ```
quote:
- description: Quote add quote around the value
+ description: |-
+ "quote" wraps the value in double quotes.
+
+ default:
+ false
+
+ remark:
+ * special characters in the value are escaped, following Go string syntax.
type: boolean
replacer:
allOf:
- $ref: '#/definitions/transformer.Replacer'
- description: Replacer specifies what value needs to be changed and how
+ description: |-
+ "replacer" defines a single replacement applied to the value.
+
+ example:
+ ```
+ replacer:
+ from: "_"
+ to: "."
+ ```
replacers:
- description: Replacers specifies a list of replacer instruction
+ description: |-
+ "replacers" defines a list of replacements applied to the value.
+
+ remark:
+ * all replacements run in a single pass, so a replaced text is never replaced again.
+
+ example:
+ ```
+ replacers:
+ - from: "_"
+ to: "."
+ - from: "v"
+ to: ""
+ ```
items:
$ref: '#/definitions/transformer.Replacer'
type: array
semVerInc:
- description: SemvVerInc specifies a comma separated list semantic versioning
- component that needs to be upgraded.
+ description: |-
+ "semverinc" defines a comma separated list of semantic version components to increment.
+
+ remark:
+ * accepted components are "major", "minor" and "patch", applied in the order given.
+ * the value must be a valid semantic version.
+ * spaces around the commas are not accepted.
+
+ example:
+ * semverinc: patch
+ * semverinc: minor,patch
type: string
trimPrefix:
- description: TrimPrefix removes a prefix to the transformer input value
+ description: |-
+ "trimprefix" defines a prefix removed from the value.
+
+ example:
+ * trimprefix: v
type: string
trimSuffix:
- description: TrimSuffix removes the suffix from the transformer input value
+ description: |-
+ "trimsuffix" defines a suffix removed from the value.
+
+ example:
+ * trimsuffix: -alpine
type: string
unquote:
- description: Unquote remove quotes around the value
+ description: |-
+ "unquote" removes the double quotes around the value.
+
+ default:
+ false
type: boolean
type: object
info:
contact: {}
- description: API for managing Updatecli pipeline reports.
- title: Udash API
- version: "1.0"
paths:
/api/:
get:
@@ -2167,12 +2325,4 @@ paths:
summary: Describe the current identity
tags:
- Tokens
-securityDefinitions:
- BearerAuth:
- description: Either an Udash API token, created from the tokens page and prefixed
- with "udash_pat_", or an access token from the configured identity provider.
- Send it as "Bearer ".
- in: header
- name: Authorization
- type: apiKey
swagger: "2.0"