test: add test files for plugin routes

This commit is contained in:
Jovan Krunić
2019-05-16 15:23:44 +02:00
parent bff6079f60
commit e3d3d022c7
3 changed files with 89 additions and 0 deletions

View 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"
}

View File

@@ -0,0 +1,8 @@
{
"errorNames": [],
"instance": {
"action": "remove",
"route": "/foo"
},
"schema": "SCPluginRegisterRequest"
}

View File

@@ -0,0 +1,7 @@
{
"errorNames": [],
"instance": {
"success": true
},
"schema": "SCPluginRegisterResponse"
}