Replies: 1 comment
-
还是尽量考虑 Typescript 来写 nest,你是我见过第一个用 JS 写的。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
javascript的语法如下:
@get(':version')
@Bind(Param('version'))
@ApiOperation({ summary: 'get First API' })
@ApiResponse({
status: 200,
description: 'return the first api version',
})
getFirstApi(version) {
console.log(version);
return this.appService.getVersion(version);
}
该api运行正常
但引用用swagger的documentbuilder生成文档时候,会报错误
/Users/jack/test/testswagger/node_modules/@nestjs/swagger/dist/explorers/api-parameters.explorer.js:34
type: types[0],
^
TypeError: Cannot read properties of undefined (reading '0')
是不是swagger插件就不支持javascript?
Beta Was this translation helpful? Give feedback.
All reactions