The node-restify library allows paths like /foo/:id
. Can swagger handle such paths? i.e. something like?
var getFoo = {
'spec': {
'description': 'foo library',
'path': '/foo/:id',
'summary': 'return foo by id',
'type': 'string',
'produces': ['application/json']
},
'action': getFooObject()
};
swagger.addGet(getFoo)
When I try this in my app, the http://locahost:3001/api-docs
page looks like:
{
apiVersion: "0.0.1",
swaggerVersion: "1.2",
apis: [
{
path: "/foo"
}
]
}
I tried escaping the double-colon with a \
character. But that didn't make a difference. Also tried replacing single quotes by double quotes. Still no difference. I am using the swagger-node-restify library which is a fork from swagger-node repository. What am I doing wrong?