apigee-127 / swagger-node-runner

The heart of Swagger-Node
MIT License
102 stars 123 forks source link

Assertion error on register #128

Open phil-warner opened 6 years ago

phil-warner commented 6 years ago

Hi

I'm using swagger-restify-mw and when I start my app I get the following error. It's not obvious to me what the problem is, but I thought it might be to others.

AssertionError: The first character of a path should be `/` or `*`
    at Router.on (/opt/bitnami/apps/smsWorks/sms-works/node_modules/find-my-way/index.js:44:3)
    at RouterRegistryRadix.add (/opt/bitnami/apps/smsWorks/sms-works/node_modules/restify/lib/routerRegistryRadix.js:42:21)
    at Router.mount (/opt/bitnami/apps/smsWorks/sms-works/node_modules/restify/lib/router.js:167:20)
    at Server.serverMethod [as del] (/opt/bitnami/apps/smsWorks/sms-works/node_modules/restify/lib/server.js:1476:33)
    at /opt/bitnami/apps/smsWorks/sms-works/node_modules/swagger-node-runner/lib/restify_middleware.js:23:18
    at Array.forEach (native)
    at Middleware.register (/opt/bitnami/apps/smsWorks/sms-works/node_modules/swagger-node-runner/lib/restify_middleware.js:22:17)
    at /opt/bitnami/apps/smsWorks/sms-works/app.js:86:24
    at /opt/bitnami/apps/smsWorks/sms-works/node_modules/swagger-restify-mw/lib/index.js:32:5
    at /opt/bitnami/apps/smsWorks/sms-works/node_modules/swagger-node-runner/index.js:234:7
phil-warner commented 6 years ago

Some extra information. I'm using Restify 7 on Node 8, with Swagger Node Runner 0.7.3.

phil-warner commented 6 years ago

More information... This looks like an incompatibility with Restify 7, which uses find-my-way for routing purposes. I downgraded to Restify 6.4.0, which fixed the issue.

theganyo commented 6 years ago

Thanks! This is good to know.

luisbilecki commented 6 years ago

Thanks!

phil-warner commented 3 years ago

Can we get this fixed?

prachikhadke commented 1 year ago

I resolved this by downgrading to v6.4.0