Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Travis build step #9

Closed
godloth opened this issue Apr 19, 2017 · 4 comments
Closed

Error with Travis build step #9

godloth opened this issue Apr 19, 2017 · 4 comments

Comments

@godloth
Copy link

godloth commented Apr 19, 2017

Hello guys

i have been looking for a utility like that one for a few weeks now .. i followed the instructions to the best i could but after many tries , i always come down with this error at the build process

Not so sure if it's a bug or something wrong i'm doing but any help will be appreciated

here's the log from the Travis build

Computing checksum with sha256sum
Checksums matched!
Now using node v7.9.0 (npm v4.2.0)

travis_time:end:15af49d8:start=1492564024861290434,finish=1492564028362466982,duration=3501176548
�[0Ktravis_fold:end:nvm.install
�[0K$ node --version
v7.9.0
$ npm --version
4.2.0
$ nvm --version
0.33.1
travis_fold:start:install
�[0Ktravis_time:start:05dec4d8
�[0K$ npm install
�[37;40mnpm�[0m �[0m�[30;43mWARN�[0m �[0m�[35mdeprecated�[0m minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
�[0m�[37;40mnpm�[0m �[0m�[30;43mWARN�[0m �[0m�[35mdeprecated�[0m minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
�[0m�[37;40mnpm�[0m �[0m�[30;43mWARN�[0m �[0m�[35mdeprecated�[0m graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
�[0m�[37;40mnpm�[0m �[0m�[30;43mWARN�[0m �[0m�[35mprefer global�[0m jison@0.4.13 should be installed with -g
�[0m

jsonpath@0.2.11 postinstall /home/travis/build/godloth/Test-doc/node_modules/jsonpath
node lib/aesprim.js > generated/aesprim-browser.js

Payment-test-openapi-spec@0.0.1 /home/travis/build/godloth/Test-doc

travis_time:end:05dec4d8:start=1492564029459106206,finish=1492564055571356505,duration=26112250299
�[0Ktravis_fold:end:install
�[0Ktravis_time:start:0cdb816b
�[0K$ npm test

Payment-test-openapi-spec@0.0.1 test /home/travis/build/godloth/Test-doc
swagger-repo validate

Adding paths to spec
/home/travis/build/godloth/Test-doc/node_modules/swagger-repo/lib/index.js:121
throw Error('All paths should be defined inside ' + pathsDir);
^

Error: All paths should be defined inside spec/paths/
at Object.exports.bundle (/home/travis/build/godloth/Test-doc/node_modules/swagger-repo/lib/index.js:121:13)
at Command. (/home/travis/build/godloth/Test-doc/node_modules/swagger-repo/bin/swagger-repo.js:41:23)
at Command.listener (/home/travis/build/godloth/Test-doc/node_modules/commander/index.js:301:8)
at emitTwo (events.js:106:13)
at Command.emit (events.js:194:7)
at Command.parseArgs (/home/travis/build/godloth/Test-doc/node_modules/commander/index.js:615:12)
at Command.parse (/home/travis/build/godloth/Test-doc/node_modules/commander/index.js:458:21)
at Object. (/home/travis/build/godloth/Test-doc/node_modules/swagger-repo/bin/swagger-repo.js:85:4)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
�[37;40mnpm�[0m �[0m�[31;40mERR!�[0m�[35m�[0m Test failed. See above for more details.
�[0m
travis_time:end:0cdb816b:start=1492564055576742665,finish=1492564057024598145,duration=1447855480
�[0K
�[31;1mThe command "npm test" exited with 1.�[0m

Done. Your build exited with 1.`

@IvanGoncharov
Copy link
Contributor

@godloth Travis fail with the following error:

Error: All paths should be defined inside spec/paths/

It's happening because you enabled splitSpec option (disabled by default):
https://github.com/godloth/Test-doc/blob/master/.yo-rc.json#L7

Solution 1

You can disable it by generating repo one more time and answer no (default) to this querion:

Split spec into separate files: paths/, definitions/ [Experimental]?

Solution 2

Or you should specify your spec here:

Please specify path to OpenAPI/Swagger spec(local file)?

And your spec will be automatically split into multiple files

Solution 3

You can manually split your spec into multiple files using these instructions:
https://github.com/godloth/Test-doc/tree/master/spec/paths
https://github.com/godloth/Test-doc/tree/master/spec/definitions

Please write to us if you will have problems with one of the proposed solutions.

@godloth
Copy link
Author

godloth commented Apr 20, 2017

Thanks for the complete answer @IvanGoncharov , i will test them out and get back to you to close the issue
thanks

@IvanGoncharov
Copy link
Contributor

@godloth Can I close this issue?

@godloth
Copy link
Author

godloth commented May 8, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants