Jira | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Description of the bug
Currently, NCMP does NOT support / slashes in the resource identifier as the OpenAPI definition would regard that as separate REST paths ie. a different rest endpoint
Slashes are currently not supported by open API for path params - https://github.com/OAI/OpenAPI-Specification/issues/892#issuecomment-281170254
Currently supported
Code Block |
---|
/v1/ch/node1/data/ds/ncmp-datastore:passthrough-operational/turing-machine:turing-machine?fields=transition-function?depth=3 |
Wanted (currently not) supported
Code Block |
---|
/v1/ch/node1/data/ds/ncmp-datastore:passthrough-operational/turing-machine:turing-machine/transition-function?depth=5 |
Solutions
Description | SolutionExample | |
---|---|---|
1 | Change resourceIdentifier resource Identifier from a path param to a query param in the openapi.yml | Sample of url |
2 | Keep it as path param also but we need to assume that all values after this slash belong to this resource only | /passthorough:Operational/{resource-identifier: .+}. As it is single param and if you enter the value by url encoding then you have to change spring HttpFirewall final StrictHttpFirewall firewall = new StrictHttpFirewall();
firewall.setAllowUrlEncodedSlash(true); |
3 | Create a method in the controller without using open api | Use spring mvc to create the endpoint |