mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 09:32:41 +00:00
test: add test files for plugin routes
This commit is contained in:
74
test/resources/PluginRegisterRequest.1.json
Normal file
74
test/resources/PluginRegisterRequest.1.json
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"errorNames": [],
|
||||||
|
"instance": {
|
||||||
|
"action": "add",
|
||||||
|
"plugin": {
|
||||||
|
"address": "http://foo.com:1234",
|
||||||
|
"name": "Foo Plugin",
|
||||||
|
"requestSchema": {
|
||||||
|
"$schema": "http://json-schema.org/draft-06/schema#",
|
||||||
|
"definitions": {
|
||||||
|
"SCFooPluginRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"query": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"query"
|
||||||
|
],
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "User query"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"query": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"query"
|
||||||
|
],
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "User query",
|
||||||
|
"id": "https://core.stapps.tu-berlin.de/v0.18.0/lib/schema/SCFooPluginRequest.json"
|
||||||
|
},
|
||||||
|
"responseSchema": {
|
||||||
|
"$schema": "http://json-schema.org/draft-06/schema#",
|
||||||
|
"definitions": {
|
||||||
|
"SCFooPluginResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "A response to a query"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "A response to a query",
|
||||||
|
"id": "https://core.stapps.tu-berlin.de/v0.18.0/lib/schema/SCFooPluginResponse.json"
|
||||||
|
},
|
||||||
|
"route": "/foo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema": "SCPluginRegisterRequest"
|
||||||
|
}
|
||||||
8
test/resources/PluginRegisterRequest.2.json
Normal file
8
test/resources/PluginRegisterRequest.2.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"errorNames": [],
|
||||||
|
"instance": {
|
||||||
|
"action": "remove",
|
||||||
|
"route": "/foo"
|
||||||
|
},
|
||||||
|
"schema": "SCPluginRegisterRequest"
|
||||||
|
}
|
||||||
7
test/resources/PluginRegisterResponse.1.json
Normal file
7
test/resources/PluginRegisterResponse.1.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"errorNames": [],
|
||||||
|
"instance": {
|
||||||
|
"success": true
|
||||||
|
},
|
||||||
|
"schema": "SCPluginRegisterResponse"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user