Feature #2317
closed
Here some output I get from the server logs about that:
File "/var/www/openatlas/mamems/openatlas/api/endpoints/parser.py", line 70, in __init__
self.set_search_param()
File "/var/www/openatlas/mamems/openatlas/api/endpoints/parser.py", line 82, in set_search_param
check_search_parameters(category, values)
File "/var/www/openatlas/mamems/openatlas/api/resources/search_validation.py", line 16, in check_search_parameters
if values['operator'] not in app.config['COMPARE_OPERATORS']:
~~~~~~^^^^^^^^^^^^
Will try to fix it. It is quite hard, because the search is not in a format that swagger handles well.
- Target version changed from 8.7.0 to 8.9.0
Thanks for feedback. If it is just about Swagger it's definitely not urgent enough to interrupt your time off (or my time to try to figure it on my own).
I just noticed it when looking with Olivia at other issues and pressed Olivia to create an issues because it might be a bug and bugs always should be documented (and of course solved at some point).
I also wasn't sure what exactly the problem is and was hoping it might just need a minor code fix like e.g. changing:
if values['operator'] not in app.config['COMPARE_OPERATORS']:
To
if 'operator' not in values or values['operator'] not in app.config['COMPARE_OPERATORS']:
Anyway, I really don't have enough insight on this and to express that it isn't that urgent, I put it further back on the roadmap.
- Assignee set to Bernhard Koschiček-Krombholz
- Status changed from Acknowledged to Closed
- Target version changed from 8.9.0 to 8.7.0
Thank you, I found the error in the OpenAPI specification and fixed it.
The list should now look like this:
...
"entityAliases": [
{
"logicalOperator": "AND",
"operator": "equal",
"values": [
"string",
0
]
}
],
"entityCidocClass": [
{
"logicalOperator": "AND",
"operator": "equal",
"values": [
"string",
0
]
}
],
...
Since it is a text field, I cannot make it in the swagger UI as chooseable options, but now everything should show up. I will try to make only one example or none, that it is easier for the user
I created a working example.
- Subject changed from API: Swaggerfile is missing operator to execute properly to API: Wrong search operators in OpenAPI file
Also available in: Atom
PDF