Closed yann510 closed 3 years ago
My application has these things - I suspect you are missing something either in your controllers or the swagger setup in your app?
Is your application open-source? If so a link to it would be amazing so I can learn what I'm doing wrong!
It is not, but I'd look at yours if you had it in github or something like that.
On Fri, Nov 13, 2020, 4:11 PM Yann Thibodeau notifications@github.com wrote:
Is your application open-source? If so a link to it would be amazing so I can learn what I'm doing wrong!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nestjsx/crud/issues/618#issuecomment-727037472, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAATHXJ7C7TH43EDZWUPZ6DSPWOHFANCNFSM4SVNRAXA .
It is in fact an open-source project, I really appreciate you giving me a hand :)
https://github.com/chocolat-chaud-io/stator
you can find the nest application under apps/api
I don't see anything super obviously wrong in your code - my only thought is perhaps the Swagger DocumentBuilder can't resolve the path for Todo
while Typescript can... I'd suggest doing a test by copying your model and referencing it as a local module.
Ok, thank you for taking a look. I will try doing that.
For anyone interested, here is how I managed to solve the issue: https://github.com/chocolat-chaud-io/stator/pull/135 The problem was caused by the fact the schemas were not loaded automatically.
For those facing the same issue, you actually need to setup the CLI https://docs.nestjs.com/openapi/cli-plugin#using-the-cli-plugin
It would be great if the generated documentation would have proper responses being returned in the examples.
Also, for the requests, it's very hard to know what is actually possible. You need to go look at the defined schemas at the bottom of the page and even then, they do not seem to be properly generated.
Any idea as to how we can improve this? I'd be happy to help.