SCIndexResponse: additionalProperty "uid" exists in instance when not allowed
Summary
An InternalServerError (statusCode 502) is thrown when index route is accessed to fetch the configuration.
Steps to reproduce
Send a POST request (with empty JSON request {}) to the index route of the backend (e.g. http://localhost:3000).
Which version of the software did you use ?
Latest master.
What is the current bug behavior?
Backend is unexpectedly returning uid property, together with expected backend and app properties. SCIndexResponse does not define that.
What is the expected correct behavior?
The backend should provide backend and app config without throwing an error.
Relevant logs and/or screenshots
{
"name": "InternalServerError",
"message": "Internal server error",
"statusCode": 502,
"stack": "Error\n at new SCError (/home/jkrunic/Desktop/OpenStApps/backend/node_modules/@openstapps/core/lib/index.js:113:27)\n at new SCInternalServerErrorResponse (/home/jkrunic/Desktop/OpenStApps/backend/node_modules/@openstapps/core/lib/index.js:223:9)\n at Object.<anonymous> (/home/jkrunic/Desktop/OpenStApps/backend/lib/routes/Route.js:81:49)\n at Generator.next (<anonymous>)\n at fulfilled (/home/jkrunic/Desktop/OpenStApps/backend/lib/routes/Route.js:4:58)\n at process._tickCallback (internal/process/next_tick.js:68:7)",
"additionalData": {
"name": "ValidationError",
"message": "Validation of request failed",
"statusCode": 400,
"additionalData": [
{
"property": "instance",
"message": "additionalProperty \"uid\" exists in instance when not allowed",
"schema": "https://core.stapps.tu-berlin.de/v0.11.0/lib/schema/SCIndexResponse.json",
"instance": {
"app": {
"campusPolygon": {
"coordinates": [
[
[
13.31916332244873,
52.50796756998264
],
[
13.336544036865234,
52.50796756998264
],
[
13.336544036865234,
52.51726547416385
],
[
13.31916332244873,
52.51726547416385
],
[
13.31916332244873,
52.50796756998264
]
]
],
"type": "Polygon"
},
"features": {
"widgets": true
},
"menus": [],
"name": "StApps - Technische Universität Berlin",
"privacyPolicyUrl": "https://stappsbe01.innocampus.tu-berlin.de/_static/privacy.md",
"settings": []
},
"backend": {
"SCVersion": "1.0.0",
"hiddenTypes": [
"date series",
"diff",
"floor"
],
"maxMultiSearchRouteQueries": 5,
"maxRequestBodySize": 524288,
"name": "Technische Universität Berlin",
"namespace": "909a8cbc-8520-456c-b474-ef1525f14209",
"sortableFields": [
{
"fieldName": "name",
"sortTypes": [
"ducet"
]
},
{
"fieldName": "type",
"sortTypes": [
"ducet"
]
},
{
"fieldName": "categories",
"onlyOnTypes": [
"academic event",
"building",
"catalog",
"dish",
"point of interest",
"room"
],
"sortTypes": [
"ducet"
]
},
{
"fieldName": "geo.point.coordinates",
"onlyOnTypes": [
"building",
"point of interest",
"room"
],
"sortTypes": [
"distance"
]
},
{
"fieldName": "geo.point.coordinates",
"onlyOnTypes": [
"building",
"point of interest",
"room"
],
"sortTypes": [
"distance"
]
},
{
"fieldName": "inPlace.geo.point.coordinates",
"onlyOnTypes": [
"date series",
"dish",
"floor",
"organization",
"point of interest",
"room",
"ticket"
],
"sortTypes": [
"distance"
]
},
{
"fieldName": "offers",
"onlyOnTypes": [
"dish"
],
"sortTypes": [
"price"
]
}
]
},
"uid": "b-tu"
},
"name": "additionalProperties",
"argument": "uid",
"stack": "instance additionalProperty \"uid\" exists in instance when not allowed"
}
]
}
}
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)