You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot start the application. Error: Invalid path template: '/items:search'. Please use {search} instead of ':search'
at Object.validateApiPath (/home/node/app/node_modules/@loopback/rest/dist/router/openapi-path.js:30:23)
at RoutingTable.registerRoute (/home/node/app/node_modules/@loopback/rest/dist/router/routing-table.js:46:24)
at HttpHandler.registerRoute (/home/node/app/node_modules/@loopback/rest/dist/http-handler.js:22:22)
at RestServer._createHttpHandler (/home/node/app/node_modules/@loopback/rest/dist/rest.server.js:312:31)
at RestServer._setupHandlerIfNeeded (/home/node/app/node_modules/@loopback/rest/dist/rest.server.js:268:14)
at RestServer.start (/home/node/app/node_modules/@loopback/rest/dist/rest.server.js:640:14)
at invokeTargetMethod (/home/node/app/node_modules/@loopback/context/dist/invocation.js:156:49)
at /home/node/app/node_modules/@loopback/context/dist/invocation.js:138:16
at Object.transformValueOrPromise (/home/node/app/node_modules/@loopback/context/dist/value-promise.js:257:16)
at invokeTargetMethodWithInjection (/home/node/app/node_modules/@loopback/context/dist/invocation.js:133:28)
at Object.invokeMethod (/home/node/app/node_modules/@loopback/context/dist/invocation.js:106:20)
at LifeCycleObserverRegistry.invokeObserver (/home/node/app/node_modules/@loopback/core/dist/lifecycle-registry.js:116:29)
at /home/node/app/node_modules/@loopback/core/dist/lifecycle-registry.js:103:25
at Array.map (<anonymous>)
at LifeCycleObserverRegistry.notifyObservers (/home/node/app/node_modules/@loopback/core/dist/lifecycle-registry.js:101:37)
at LifeCycleObserverRegistry.notifyGroups (/home/node/app/node_modules/@loopback/core/dist/lifecycle-registry.js:147:28)
Steps to reproduce
Try to register a route with colon.
Current Behavior
Got error when startup.
because of this validation.
https://github.com/strongloop/loopback-next/blob/6423d40f8520f863836af1d64e1c10b1dbc7507e/packages/rest/src/router/openapi-path.ts#L22-L32
Expected Behavior
A path using colon like custom verb for the resource (like
/items:serach
,/items:move
) should be passed the validation.Google's API design guideline recommends this expression as custom methods.
Additional information
The text was updated successfully, but these errors were encountered: