openapi-metadata NoExplicitTypeError #2137
Unanswered
boompikachu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It seems that following the documentation for openapi-metadata, when generating the document, there's an error
NoExplicitTypeError: Unable to infer OpenAPI type from TypeScript reflection system. You need to provide explicit type for 'name' of 'User' class
This error can be solved by adding
type
in the@ApiProperty()
for example:@ApiProperty({ type: "number" })
Is this a bug or we have to explicitly write down the type every time
pnpm tsx ./src/index.ts
I wanted to put in issue but there is no openapi-metadata template and there's also no blank template
Beta Was this translation helpful? Give feedback.
All reactions