support --options flag in generate-swagger#812
Conversation
Eomm
left a comment
There was a problem hiding this comment.
Oh gosh, please write a comprehensive PR description next time
This fix relates to #687 and it propagates the same fix to the generate swagger command because if you write generate-swagger --options it is ignored.
It is not clear to me why this option is needed:
this command spins up a fastify (without listening) and it generates the swagger. Whatever hooks and additional configurations should not matter.
Could you help me with an example?
In case, could you add a test in the test/generate-swagger.test.js file?
Sure, I have custom keywords defined for the ajv schemas I use. In order for the generate-swagger command to work I need to pass ajv options to fastify. Without this the schemas fail validation and the swagger output fails to generate. |
|
Ok, thanks for helping me Would you mind to add a test? Without it we can't garantee to remove this feature accidentally in future |
Checklist
npm run testandnpm run benchmarkand the Code of conduct