Commit 7186b1a9 authored by Lukas Burgey's avatar Lukas Burgey

Add schemas for input and output

parent 5417d535
...@@ -5,6 +5,7 @@ FEUDAL scripts are executed by a FEUDAL client to facilitate the customized depl ...@@ -5,6 +5,7 @@ FEUDAL scripts are executed by a FEUDAL client to facilitate the customized depl
of an arbitrary service. of an arbitrary service.
They use the JSON encoding for input and output. The specific formats are outlined below. They use the JSON encoding for input and output. The specific formats are outlined below.
Schema files for [input](schema-input.json) and [output](schema-output.json) are also available.
Input Format Input Format
...@@ -70,4 +71,4 @@ Output Format ...@@ -70,4 +71,4 @@ Output Format
"key": "value" "key": "value"
} }
} }
``` ```
\ No newline at end of file
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"state_target": {
"type": "string",
"enum": [
"deployed",
"not_deployed"
]
},
"user": {
"type": "object",
"properties": {
"userinfo": {
"type": "object",
"properties": {
"eduPersonEntitlement": {
"type": "array",
"items": {
"type": "string"
}
},
"email": {
"type": "string"
},
"email_verified": {
"type": "string"
},
"groups": {
"type": "array",
"items": [
{
"type": "string"
}
]
},
"iss": {
"type": "string"
},
"name": {
"type": "string"
},
"preferred_username": {
"type": "string"
},
"ssh_key": {
"type": "string"
},
"sub": {
"type": "string"
}
},
"required": [
"email",
"email_verified",
"groups",
"iss",
"name",
"preferred_username",
"ssh_key",
"sub"
]
}
},
"required": [
"userinfo"
]
},
"credentials": {
"type": "object",
"properties": {
"ssh_key": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
]
}
]
}
},
"required": [
]
},
"questionnaire": {
"type": "object"
}
},
"required": [
"state_target",
"user",
"credentials"
]
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"oneOf": [
{
"properties": {
"state": {
"type": "string",
"enum": [
"deployed"
]
},
"message": {
"type": "string"
},
"credentials": {
"type": "object"
}
},
"required": [
"state"
]
},
{
"properties": {
"state": {
"type": "string",
"enum": [
"not_deployed"
]
}
},
"required": [
"state"
]
},
{
"properties": {
"state": {
"type": "string",
"enum": [
"failed",
"rejected"
]
},
"message": {
"type": "string"
}
},
"required": [
"state",
"message"
]
},
{
"properties": {
"state": {
"type": "string",
"enum": [
"questionnaire"
]
},
"questionnaire": {
"type": "object"
}
},
"required": [
"state",
"questionnaire"
]
}
]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment