node-restifyライブラリは、 のようなパスを許可します/foo/:id
。そのようなパスを闊歩できますか? つまり何か?
var getFoo = {
'spec': {
'description': 'foo library',
'path': '/foo/:id',
'summary': 'return foo by id',
'type': 'string',
'produces': ['application/json']
},
'action': getFooObject()
};
swagger.addGet(getFoo)
アプリでこれを試すと、http://locahost:3001/api-docs
ページは次のようになります。
{
apiVersion: "0.0.1",
swaggerVersion: "1.2",
apis: [
{
path: "/foo"
}
]
}
ダブルコロンを\
文字でエスケープしてみました。しかし、それは違いはありませんでした。また、一重引用符を二重引用符に置き換えてみました。それでも違いはありません。swagger -nodeリポジトリからのフォークであるswagger-node-restifyライブラリを使用しています。私は何を間違っていますか?