[ ] Regression
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
In response to this: https://github.com/nestjs/nest/issues/727.
To implement this were you thinking of using https://github.com/fastify/fastify-swagger? Or is there another plan? Wondering if I could take a chance at setting something up. Looking for some guidance first though.
I'm guessing that we'll use fastify-swagger. Feel free to create a pull request 馃檪
Fastify integration is available since v2.2.0 release 馃檳鉂わ笍
@kamilmysliwiec, thanks a lot for the Feature! I gave it a test today and I saw a couple of issues:
@Param) do not appear to be filled in the endpointsWhen rendering them using express, it works as expected. Using exactly the same app/config and just swapping to fastify I can find the previous errors.
Would you like me to create a new issue or maybe this can be tracked in this issue? I guess there must be some differences between the express and fastify implementation of the swagger docs, or I'm not sure...
i also see about issues. My NPM packages are up to date.
We're blocked by this issue https://github.com/fastify/fastify-swagger/issues/97 now.
A possible workaround would be to temporarly create a file using generated specification, in this way:
const swaggerFile = 'swagger.json';
fs.writeFileSync(swaggerFile, JSON.stringify(document));
httpServer.register(fastifySwagger, {
swagger: document,
exposeRoute: true,
routePrefix: path,
mode: 'static',
specification: {
path: swaggerFile,
},
});
My PR to fastify-swagger is merged already. v2.4.2 of @nestjs/swagger is available as well.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@kamilmysliwiec, thanks a lot for the Feature! I gave it a test today and I saw a couple of issues:
@Param) do not appear to be filled in the endpointsWhen rendering them using express, it works as expected. Using exactly the same app/config and just swapping to fastify I can find the previous errors.
Would you like me to create a new issue or maybe this can be tracked in this issue? I guess there must be some differences between the express and fastify implementation of the swagger docs, or I'm not sure...