Skip to content
This repository has been archived by the owner on Jan 25, 2020. It is now read-only.

Upgrade enjoi version #65

Merged
merged 3 commits into from
Feb 18, 2016
Merged

Upgrade enjoi version #65

merged 3 commits into from
Feb 18, 2016

Conversation

subeeshcbabu-zz
Copy link
Member

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

@grawk
Copy link
Member

grawk commented Feb 3, 2016

What are we getting from enjoi@^1?

@subeeshcbabu-zz
Copy link
Member Author

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.

@subeeshcbabu-zz
Copy link
Member Author

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.

@grawk
Copy link
Member

grawk commented Feb 3, 2016

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?

@subeeshcbabu-zz
Copy link
Member Author

No bugs reported yet. I found this while testing the app create flow. Ah, Let me raise a bug for this first.

@subeeshcbabu-zz
Copy link
Member Author

Linking the issue #68

@grawk
Copy link
Member

grawk commented Feb 3, 2016

👍

@subeeshcbabu-zz
Copy link
Member Author

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.

tlivings added a commit that referenced this pull request Feb 18, 2016
@tlivings tlivings merged commit 0b69035 into krakenjs:master Feb 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants