wzr1337/rsi.server

$spec does not work

Opened this issue · 3 comments

When using the $spec keyword on element level, the following error is shown:

GET http://localhost:3000/medialibrary/tracks/$spec

TypeError: Cannot read property 'getValue' of undefined
    at /Users/gxc9gk6/source/rsiServer/bin/index.js:281:36
    at Layer.handle [as handle_request] (/Users/gxc9gk6/source/rsiServer/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/gxc9gk6/source/rsiServer/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/Users/gxc9gk6/source/rsiServer/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/gxc9gk6/source/rsiServer/node_modules/express/lib/router/layer.js:95:5)
    at /Users/gxc9gk6/source/rsiServer/node_modules/express/lib/router/index.js:281:22
    at param (/Users/gxc9gk6/source/rsiServer/node_modules/express/lib/router/index.js:354:14)
    at param (/Users/gxc9gk6/source/rsiServer/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/Users/gxc9gk6/source/rsiServer/node_modules/express/lib/router/index.js:410:3)
    at next (/Users/gxc9gk6/source/rsiServer/node_modules/express/lib/router/index.js:275:10)

Current output is

GET http://localhost:3000/medialibrary/tracks/$spec

HTTP/1.1 404 Not Found
X-Powered-By: Express
Vary: Origin
Access-Control-Expose-Headers: Location
Date: Mon, 19 Feb 2018 11:07:00 GMT
Connection: close
Transfer-Encoding: chunked

I think the $spec keyword definition has changed in protocol v1.8.x to be supported only at the service root level and reveal the specification of the entire service.

This issue should be closed, and open a new issue $spec always returns HTTP 404 instead.