Error: All paths should be defined inside spec/paths/
monolithed opened this issue · 5 comments
monolithed commented
? Do you already have OpenAPI/Swagger spec for your API? No
? Your API name (without API) Yoda
? Specify name of GitHub repo in format User/Repo: monolithed/test
? Split spec into separate files: paths/*, definitions/* [Experimental]? Yes
? Prepare code samples Yes
? Install SwaggerUI Yes
create package.json
identical .gitignore
create LICENSE
create README.md
identical .travis.yml
create gulpfile.js
create scripts/build.js
create scripts/deploy-branch.js
create web/index.html
create spec/README.md
create spec/paths/README.md
create spec/definitions/README.md
create spec/code_samples/README.md
➜ npm start
> test-openapi-spec@0.0.1 start /Users/a.abashkin/workspace/mail.ru/@qa/test-doc
> gulp serve
[18:24:03] Using gulpfile ~/workspace/mail.ru/@qa/test-doc/gulpfile.js
[18:24:03] Starting 'build'...
[18:24:03] Starting 'watch'...
[18:24:03] Finished 'watch' after 20 ms
[18:24:03] Starting 'edit'...
[18:24:03] Finished 'edit' after 2.61 ms
[18:24:03] swagger-editor started http://localhost:5000
/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 (/doc/node_modules/swagger-repo/lib/index.js:121:13)
at Command.<anonymous> (/doc/node_modules/swagger-repo/bin/swagger-repo.js:18:23)
at Command.listener (/doc/node_modules/commander/index.js:300:8)
at emitTwo (events.js:125:13)
at Command.emit (events.js:213:7)
at Command.parseArgs (/doc/node_modules/commander/index.js:635:12)
at Command.parse (/doc/node_modules/commander/index.js:457:21)
at Object.<anonymous> (/doc/node_modules/swagger-repo/bin/swagger-repo.js:85:4)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-openapi-spec@0.0.1 swagger: `swagger-repo "bundle" "-o" "web_deploy/swagger.json"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-openapi-spec@0.0.1 swagger script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/a.abashkin/.npm/_logs/2017-10-19T15_24_05_820Z-debug.log
/doc/node_modules/shelljs/src/common.js:417
if (config.fatal) throw e;
^
Error: exec: internal error
at Object.error (/doc/node_modules/shelljs/src/common.js:128:27)
at _exec (/doc/node_modules/shelljs/src/exec.js:292:12)
at /doc/node_modules/shelljs/src/common.js:350:23
at Object.<anonymous> (/doc/scripts/build.js:12:1)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Function.Module.runMain (module.js:665:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-openapi-spec@0.0.1 build: `node ./scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-openapi-spec@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/a.abashkin/.npm/_logs/2017-10-19T15_24_05_865Z-debug.log
[18:24:05] 'build' errored after 2.35 s
[18:24:05] Error: Command failed: npm run build
/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 (/doc/node_modules/swagger-repo/lib/index.js:121:13)
at Command.<anonymous> (/doc/node_modules/swagger-repo/bin/swagger-repo.js:18:23)
at Command.listener (/doc/node_modules/commander/index.js:300:8)
at emitTwo (events.js:125:13)
at Command.emit (events.js:213:7)
at Command.parseArgs (/doc/node_modules/commander/index.js:635:12)
at Command.parse (/doc/node_modules/commander/index.js:457:21)
at Object.<anonymous> (/doc/node_modules/swagger-repo/bin/swagger-repo.js:85:4)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-openapi-spec@0.0.1 swagger: `swagger-repo "bundle" "-o" "web_deploy/swagger.json"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-openapi-spec@0.0.1 swagger script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/a.abashkin/.npm/_logs/2017-10-19T15_24_05_820Z-debug.log
/doc/node_modules/shelljs/src/common.js:417
if (config.fatal) throw e;
^
Error: exec: internal error
at Object.error (/doc/node_modules/shelljs/src/common.js:128:27)
at _exec (/doc/node_modules/shelljs/src/exec.js:292:12)
at /doc/node_modules/shelljs/src/common.js:350:23
at Object.<anonymous> (/doc/scripts/build.js:12:1)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Function.Module.runMain (module.js:665:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-openapi-spec@0.0.1 build: `node ./scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-openapi-spec@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/a.abashkin/.npm/_logs/2017-10-19T15_24_05_865Z-debug.log
at ChildProcess.exithandler (child_process.js:271:12)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:927:16)
at Socket.stream.socket.on (internal/child_process.js:348:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:547:12)
Adding paths to spec
Error: All paths should be defined inside spec/paths/
at Object.exports.bundle (/doc/node_modules/swagger-repo/lib/index.js:121:13)
at /doc/node_modules/swagger-repo/lib/index.js:35:27
at Layer.handle [as handle_request] (/doc/node_modules/express/lib/router/layer.js:95:5)
at next (/doc/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/doc/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/doc/node_modules/express/lib/router/layer.js:95:5)
at /doc/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/doc/node_modules/express/lib/router/index.js:335:12)
at next (/doc/node_modules/express/lib/router/index.js:275:10)
at SendStream.error (/doc/node_modules/express/node_modules/serve-static/index.js:121:7)
Adding paths to spec
Error: All paths should be defined inside spec/paths/
at Object.exports.bundle (/doc/node_modules/swagger-repo/lib/index.js:121:13)
at /doc/node_modules/swagger-repo/lib/index.js:35:27
at Layer.handle [as handle_request] (/doc/node_modules/express/lib/router/layer.js:95:5)
at next (/doc/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/doc/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/doc/node_modules/express/lib/router/layer.js:95:5)
at /doc/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/doc/node_modules/express/lib/router/index.js:335:12)
at next (/doc/node_modules/express/lib/router/index.js:275:10)
at SendStream.error (/doc/node_modules/express/node_modules/serve-static/index.js:121:7)
^C
pentateu commented
+1 Same issue here
pentateu commented
@monolithed did u manage dot get it going ?
ksingh7 commented
+1 same issue here too
@pentateu @monolithed did you guys manged to fix this.
Runrioter commented
Because you need put your api paths and definitions in spec/paths and definitions.
RomanHotsiy commented
Stale, should be working now