Skip to content

Instantly share code, notes, and snippets.

@gigo1980
Last active July 25, 2023 09:38
Show Gist options
  • Save gigo1980/073f95cf635f0caa36ad70f8a84cee83 to your computer and use it in GitHub Desktop.
Save gigo1980/073f95cf635f0caa36ad70f8a84cee83 to your computer and use it in GitHub Desktop.
Sidecar HTTP Communication
{
/* Reference to Publish repository */
"application": {
"organization": "nordlb-api",
"repository": "example-publish",
"target": "v1.0.2"
"commitId": "juhtg8g7h690h"
},
"feature": {
# Needs adjustments on the operator
"plans": "gko",
"[a-z]": ["nko"|"gko"] # String
}
/* Reference to checked out git repositories */
"sources": [
{
"name": "config",
"path": "/tmp/ju8ghz890j78/config",
"commitId": "uhf8wf89u0"
},
{
"name": "oas",
"path": "/tmp/ju8ghz890j78/config",
"commitId": "9uihug5689"
}
],
"additionalData": [
{
"apiId": "iuzh87j80ßk9809k8",
"additionalInfo1": true,
"somOtherValue": "foobar"
}
]
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "#/$defs/WebServerRequest",
"$defs": {
"AdditionalData": {
"properties": {},
"additionalProperties": false,
"type": "object"
},
"Application": {
"properties": {
"organization": {
"type": "string"
},
"repository": {
"type": "string"
},
"target": {
"type": "string"
},
"commitId": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"organization",
"repository",
"target",
"commitId"
]
},
"PathMapping": {
"properties": {
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"commitId": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"name",
"path",
"commitId"
]
},
"WebServerRequest": {
"properties": {
"application": {
"$ref": "#/$defs/Application"
},
"sources": {
"items": {
"$ref": "#/$defs/PathMapping"
},
"type": "array"
},
"additionalData": {
"items": {
"$ref": "#/$defs/AdditionalData"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"application",
"sources",
"additionalData"
]
}
}
}
{
"code": 0,
"message": "Everything fine"
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "#/$defs/WebServerResponse",
"$defs": {
"WebServerResponse": {
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string",
"contentEncoding": "base64"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"code",
"message"
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment