Closed subeeshcbabu-zz closed 8 years ago
What are we getting from enjoi@^1
?
The generated app's unit test uses enjoi
to validate the output schema of response.
https://github.com/krakenjs/generator-swaggerize/blob/master/app/templates/_test_express.js#L59
The older version of enjoi
is breaking the unit tests.
This is basically a bug fix.
swaggerize-express
@^4 brings in "enjoi": "^1.0.0"
https://github.com/krakenjs/generator-swaggerize/blob/master/app/templates/_package.json#L21
However the generated app's dev dependency on enjoi
is stuck at an older version making the unit test fail.
Right, but is there a feature or bug fix in 1.0 which we want specifically? Is this related to any open issues on this repo?
No bugs reported yet. I found this while testing the app create flow. Ah, Let me raise a bug for this first.
Linking the issue #68
:+1:
Found an issue with the Major version upgrade of enjoi
.
Interestingly unit tests of generator did not catch this issue.
The options
structure changed as part of the enjoi
version ^1. Now it expects a subSchemas
property.
https://github.com/tlivings/enjoi#api.
/swaggerize-examples/petstore-simple-express/node_modules/enjoi/lib/enjoi.js:25
if (current.type) {
^
TypeError: Cannot read property 'type' of undefined
Updated the PR with a fix for this.
swaggerize-express@^4 brings in "enjoi": "^1.0.0" https://github.com/krakenjs/generator-swaggerize/blob/master/app/templates/_package.json#L21 However the generated app's dev dependency on enjoi is stuck at an older version making the unit test fail. https://github.com/krakenjs/generator-swaggerize/blob/master/app/templates/_test_express.js#L59