Closed subeeshcbabu-zz closed 7 years ago
generator-swaggerize@3.0.0
generates handlers that uses Mock data generator by default. Mock data generator using swagmock generates responses based on the swagger spec.
Unit tests generates parameters and requests based on the swagger spec using swagmock module, so that the generated unit tests will be able to make sure that the API works end to end.
The default status code set by the generated handler is
501
- Not Implemented. https://github.com/krakenjs/generator-swaggerize/blob/master/app/templates/_handler_express.js#L14 This status code makes sense because, it is up to the actual API implementor to provide the functionality here. However the tests generated by the generator checks for200
status code and this makes thenpm test
on the generated application to fail by default. I think it would be useful if we could change the501
status code to200
(and Add a comment on complete the implementation details) so that the tests will not fail by default.