Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

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?

You must be logged in to vote

Replies: 1 comment

Comment options

还是尽量考虑 Typescript 来写 nest,你是我见过第一个用 JS 写的。

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
2-Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.