{"_id":"swagger-jack","_rev":"48-75358bc7b2ee44d1495db8bac6196ca3","name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","dist-tags":{"latest":"1.6.3"},"versions":{"1.0.0":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"}],"keywords":["swagger","express","validation","api","descriptor"],"license":"MIT","version":"1.0.0","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"NODE_ENV=test mocha --compilers coffee:coffee-script -R spec","test-win":"(set NODE_ENV=test) & mocha --compilers coffee:coffee-script -R spec","preinstall":"npm install -g coffee-script mocha","postinstall":"coffee --bare -o lib -c src"},"dependencies":{"async":"0.1.22","express":"3.0.6","json-gate":"0.8.21","underscore":"1.4.3","coffee-script":"1.4.0","request":"2.12.0"},"devDependencies":{"chai":"1.4.1","js-yaml":"1.0.3","mocha":"1.8.1"},"_id":"swagger-jack@1.0.0","dist":{"shasum":"ad72b934c9620c7e908a6392c64b25ff0dd0f690","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.0.0.tgz","integrity":"sha512-FmZe1uO/BjaV4SnQe0lQCPuaMsGeRLK8+iu7pfVIc8pbrQUUi7iBXc6E9QJzTph3cpE1ZUxy1f4RMR4kXxSmrw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGJ5oAF9/PU03OCjskyppfjeazdwYqq+/gpzhhE5czpYAiEAs0mYnVPN7p+Y0XI9lWaQ344mTdoEgHztgljmVdJGWBc="}]},"_npmVersion":"1.2.0","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}],"directories":{}},"1.0.1":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"}],"keywords":["swagger","express","validation","api","descriptor"],"license":"MIT","version":"1.0.1","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"NODE_ENV=test mocha --compilers coffee:coffee-script -R spec","testwin":"(set NODE_ENV=test) & mocha --compilers coffee:coffee-script -R spec","preinstall":"npm install -g coffee-script mocha","postinstall":"coffee --bare -o lib -c src"},"dependencies":{"async":"0.1.22","express":"3.0.6","json-gate":"0.8.21","underscore":"1.4.3","coffee-script":"1.4.0","request":"2.12.0"},"devDependencies":{"chai":"1.4.1","js-yaml":"1.0.3","mocha":"1.8.1"},"_id":"swagger-jack@1.0.1","dist":{"shasum":"07928ee559b816cb114dd892ced7e909288eb03b","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.0.1.tgz","integrity":"sha512-Gc8KakDh3+Z3NT4AQEhI578bzBi/3bJyW45PKChZh4oiDNfF6+BRKY7JQ8VIydhMLsmnHeTJZAGp2tHEwV6teA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6Uam3zR61TpuO5lmC0E/iplUz99CuFD6RxEKceDz0zwIgR8/1vcNZucFFH3xTHR9np85Jg2k1CceImch8+h32Zq4="}]},"_npmVersion":"1.2.0","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}],"directories":{}},"1.1.0":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"}],"keywords":["swagger","express","validation","api","descriptor"],"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"license":"MIT","version":"1.1.0","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"NODE_ENV=test mocha --compilers coffee:coffee-script -R spec","testwin":"(set NODE_ENV=test) & mocha --compilers coffee:coffee-script -R spec","preinstall":"npm install -g coffee-script mocha","postinstall":"coffee --bare -o lib -c src"},"dependencies":{"async":"0.1.22","express":"3.0.6","json-gate":"0.8.21","underscore":"1.4.3","coffee-script":"1.4.0","request":"2.12.0"},"devDependencies":{"chai":"1.4.1","js-yaml":"1.0.3","mocha":"1.8.1"},"_id":"swagger-jack@1.1.0","dist":{"shasum":"e5497f6af2957e5fbfe41e943cad94e6a8c08642","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.1.0.tgz","integrity":"sha512-4lKRykPvK25Om//teRTjjqHpAhCUqGGF17xXcmACQ3hCd6f6Jp8A9Zm7XS5NTAYJoXaC7gtSJuJil5wVgFMilQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCX2+SLTlZYh/XjvCaX6Yoy7n8G7B9CURClgJGcBQoGpgIhAIR4cXdqfz0B+25LaF3po672bTKeEcRRFzlE8tHQpLjk"}]},"_npmVersion":"1.2.0","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}],"directories":{}},"1.2.0":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"}],"keywords":["swagger","express","validation","api","descriptor"],"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"license":"MIT","version":"1.2.0","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"NODE_ENV=test mocha --compilers coffee:coffee-script -R spec","testwin":"(set NODE_ENV=test) & mocha --compilers coffee:coffee-script -R spec","prepublish":"coffee --bare -o lib -c src"},"dependencies":{"async":"0.1.22","express":"3.0.6","json-gate":"0.8.21","underscore":"1.4.3","coffee-script":"1.4.0","request":"2.12.0"},"devDependencies":{"chai":"1.4.1","js-yaml":"1.0.3","mocha":"1.8.1"},"_id":"swagger-jack@1.2.0","dist":{"shasum":"baf3b423be1c5ae3a4ad528bf22ce962ebe6420f","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.2.0.tgz","integrity":"sha512-bLjKyxOXgM/av7jOYq2ixx+UFlV6r+g0yDgxwjdV1jpWAEvtemHRYV9s84r3qFl0gAyoruiUwUx4cmGJyp9MoQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB5vuORdyZwgVVzZSPtQzpGki3eTLvKNVp7xVVA3yW6bAiEA6bgfKWoE4lKHEOqNIGEc/6hXM0VQGFO1/Rkx/ZbalME="}]},"_npmVersion":"1.2.0","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}],"directories":{}},"1.3.0":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"}],"keywords":["swagger","express","validation","api","descriptor"],"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"license":"MIT","version":"1.3.0","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"NODE_ENV=test mocha --compilers coffee:coffee-script -R spec","testwin":"(set NODE_ENV=test) & mocha --compilers coffee:coffee-script -R spec","prepublish":"coffee --bare -o lib -c src"},"dependencies":{"async":"0.1.22","express":"3.0.6","json-gate":"0.8.21","underscore":"1.4.3","coffee-script":"1.4.0","request":"2.12.0"},"devDependencies":{"chai":"1.4.1","js-yaml":"1.0.3","mocha":"1.8.1"},"_id":"swagger-jack@1.3.0","dist":{"shasum":"448a069a11a4f87a106cdc064e1d3344d087a43a","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.3.0.tgz","integrity":"sha512-nyxZerYVS8GDZ+vFDR35IHjrdfVb0Ghz00qSvg3/QQtyLMBxTt0JZVh1om2A/q2dEv02XA96mSKw5hS4N9uv5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFk8yD8t0BEKdSLli/c7NV6KVoRyZRcBIahKIxLh2dIbAiEA+k5A+fSwlvfGBn5jrUBmLVY2PRFdC5BRnlwqiqLchGo="}]},"_npmVersion":"1.2.0","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}],"directories":{}},"1.3.1":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"},{"name":"Simon Lopez","email":"simon.lopez@slopez.org"}],"keywords":["swagger","express","validation","api","descriptor"],"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"license":"MIT","version":"1.3.1","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"NODE_ENV=test mocha --compilers coffee:coffee-script -R spec","testwin":"(set NODE_ENV=test) & mocha --compilers coffee:coffee-script -R spec","prepublish":"coffee --bare -o lib -c src"},"dependencies":{"async":"0.1.22","express":"3.0.6","json-gate":"0.8.21","underscore":"1.4.3","coffee-script":"1.4.0","request":"2.12.0"},"devDependencies":{"chai":"1.4.1","js-yaml":"1.0.3","mocha":"1.8.1"},"_id":"swagger-jack@1.3.1","dist":{"shasum":"468e10d42f76e536cd88756bc0906efdece630ed","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.3.1.tgz","integrity":"sha512-jT6BC/wY0ebSPUxOD2zOFjDieQACZe9wBnHJGLDJ7O0On+QacfPED7z0afkOuvKbW9tSZvJyZJ/xjjawI5o9Kg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHxMMyXr/8+JmDKOemT596RcpfG9iFghEbtP244vg9hXAiAudva8vglDwOmG4tnIMWdVtyJpXflyDgKj2cqco9wlOA=="}]},"_npmVersion":"1.2.0","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}],"directories":{}},"1.4.0":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"},{"name":"Simon Lopez","email":"simon.lopez@slopez.org"}],"keywords":["swagger","express","validation","api","descriptor"],"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"license":"MIT","version":"1.4.0","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"cake test","prepublish":"cake build"},"dependencies":{"async":"0.2.6","coffee-script":"1.6.2","express":"3.1.0","json-gate":"0.8.21","underscore":"1.4.4","request":"2.16.6","rimraf":"2.1.4"},"devDependencies":{"chai":"1.5.0","js-yaml":"2.0.3","mocha":"1.8.2"},"_id":"swagger-jack@1.4.0","dist":{"shasum":"e9551191da12359b930820ac99932bb33572cf0b","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.4.0.tgz","integrity":"sha512-ICV7X8UT75hXfgkiRs/I62FHzyyBxOeLJffmv2D6h1xaaiuXkxYkPVo8Q5U3REESUrcksnoWlISHRpV+nH7Lag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEswvsinqEPoDLgHbHwD2Yx7fI+dhccf8RSZTOvADyrOAiB2qcHEeNnZQSw2bWPmfvZoV0fjcL47eWyrX6vWbOFjog=="}]},"_npmVersion":"1.2.0","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}],"directories":{}},"1.4.1":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"},{"name":"Simon Lopez","email":"simon.lopez@slopez.org"}],"keywords":["swagger","express","validation","api","descriptor"],"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"license":"MIT","version":"1.4.1","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"cake test","prepublish":"cake build"},"dependencies":{"async":"0.2.6","coffee-script":"1.6.2","express":"3.1.0","json-gate":"0.8.21","underscore":"1.4.4","request":"2.16.6","rimraf":"2.1.4"},"devDependencies":{"chai":"1.5.0","js-yaml":"2.0.3","mocha":"1.8.2"},"_id":"swagger-jack@1.4.1","dist":{"shasum":"b0076e28b71e4f567793ba1eb669c5029e491fea","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.4.1.tgz","integrity":"sha512-R4aRY+Gc6YPk0FRCtRaeFsC93NB7gY34JfMDsCmAVOkCLz9FqGIv7mb9d4hBD3Tzp/r6AdATLxpWPZ3tvntOwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBX+Ko+gQwZVWiR0zHMSwNn6ljRDwRoIuCkZu5hSrKtnAiBodQvDzIuOmb1xCH9AUAYKOTke9iD4SQgEG3C2YWOF2Q=="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}]},"1.4.2":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"},{"name":"Simon Lopez","email":"simon.lopez@slopez.org"}],"keywords":["swagger","express","validation","api","descriptor"],"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"license":"MIT","version":"1.4.2","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"cake test","prepublish":"cake build"},"dependencies":{"async":"0.2.6","coffee-script":"1.6.2","express":"3.1.0","json-gate":"0.8.21","underscore":"1.4.4","request":"2.16.6","rimraf":"2.1.4"},"devDependencies":{"chai":"1.5.0","js-yaml":"2.0.3","mocha":"1.8.2"},"_id":"swagger-jack@1.4.2","dist":{"shasum":"a5338f06867e45d3064c59f913ddda1ee4bd653a","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.4.2.tgz","integrity":"sha512-R+g70G192OMyGAlxBu02cbw6bbD2W2QU98S2wwOuNHlHzgNlAYz0rGNH8fAOx6X6Sqa0ikD9qSyXmrpdMmD8kA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDXLQdwevI1yrNPnpPMzC74BrBJIzQkI7eFdOglJER0QAiEAixFLKkZsxw1NyGUwiRMLy7Br8WqVzfcVH7gV3UmHWks="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}]},"1.5.0":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"},{"name":"Simon Lopez","email":"simon.lopez@slopez.org"}],"keywords":["swagger","express","validation","api","descriptor"],"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"license":"MIT","version":"1.5.0","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"cake test","prepublish":"cake build"},"dependencies":{"async":"0.2.6","coffee-script":"1.6.2","express":"3.1.0","json-gate":"0.8.21","underscore":"1.4.4","request":"2.16.6","rimraf":"2.1.4"},"devDependencies":{"chai":"1.5.0","js-yaml":"2.0.3","mocha":"1.8.2"},"_id":"swagger-jack@1.5.0","dist":{"shasum":"cf24dec2bcf177aef6eceb822a8061109b5e9bc4","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.5.0.tgz","integrity":"sha512-JuAh/d32X4TAhJ43T3gyR1yfcI0J+Xr4NcDoUYbeAUA8Wui7GQJEhL32X3ak5p3ciF5ohcE0v2DHoD2mhSn8rw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDzU+aP4tn/af42azTDvm2H8WByXNqbSBt1LSHekbDjRAiEA6uXNa+0ViiQM9qh3Rzr8jB4qHFjydyxszpnEDSwzU5g="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}]},"1.6.0":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"},{"name":"Simon Lopez","email":"simon.lopez@slopez.org"}],"keywords":["swagger","express","validation","api","descriptor"],"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"license":"MIT","version":"1.6.0","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"cake test","prepublish":"cake build"},"dependencies":{"async":"0.2.6","coffee-script":"1.6.2","express":"3.1.0","json-gate":"0.8.21","underscore":"1.4.4","request":"2.16.6","rimraf":"2.1.4"},"devDependencies":{"chai":"1.5.0","js-yaml":"2.0.3","mocha":"1.8.2"},"_id":"swagger-jack@1.6.0","dist":{"shasum":"f5348f6dd9cd8eb4f3b0309eb86306b1b7272a10","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.6.0.tgz","integrity":"sha512-VZzKhZlm2wjVyKNvMCzlGJ74PId8pvYKg+XVo6EogQuX+i5yNCbQUmqE8+Oe65jNH2rUJaG1ckf+Kfphv4IvvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDquTAxwFf4Axsj92h/NEqcAAbUIywbTyJmp1QoOZpahQIgAZ3fABKHY2Y5tfkyoyHTMJUXVloDPDeBlkioqYtq+IY="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}]},"1.6.1":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"},{"name":"Simon Lopez","email":"simon.lopez@slopez.org"}],"keywords":["swagger","express","validation","api","descriptor"],"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"license":"MIT","version":"1.6.1","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"cake test","prepublish":"cake build"},"dependencies":{"async":"0.2.6","coffee-script":"1.6.2","express":"3.1.0","json-gate":"0.8.21","underscore":"1.4.4","request":"2.16.6","rimraf":"2.1.4"},"devDependencies":{"chai":"1.5.0","js-yaml":"2.0.3","mocha":"1.8.2"},"_id":"swagger-jack@1.6.1","dist":{"shasum":"525c8f91981eb09e1cf264f0fccf3fb71821f3ad","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.6.1.tgz","integrity":"sha512-vLnkX84ZQW5FIS1DDkmB3tKMhj86n/VcfFnOLPUxGG5HPm0zOyNSd+/LASP+23Xao2uPdCl96P2BQsv78IuaDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFARR2Imiq+UifEDq2UJqudA5t+HB0zqts9RzoGLw3mRAiBdf3gGTedEpr3KuwPUGu+GWYQi2fu/pF00godmGXsSBg=="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}]},"1.6.2":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"},{"name":"Simon Lopez","email":"simon.lopez@slopez.org"}],"keywords":["swagger","express","validation","api","descriptor"],"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"license":"MIT","version":"1.6.2","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"cake test","prepublish":"cake build"},"dependencies":{"async":"0.2.6","coffee-script":"1.6.2","express":"3.1.0","json-gate":"0.8.21","underscore":"1.4.4","request":"2.16.6","rimraf":"2.1.4"},"devDependencies":{"chai":"1.5.0","js-yaml":"2.0.3","mocha":"1.8.2"},"bugs":{"url":"https://github.com/feugy/swagger-jack/issues"},"_id":"swagger-jack@1.6.2","dist":{"shasum":"b61e23d9b14ea0eb437f87475cb30f8b9f7e4e54","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.6.2.tgz","integrity":"sha512-B1NwLwKXrpj9zvlhbHuN3VQ3jBJbPcFRE7uCVpUcS0+PSA9fi5NNGs9TX064IeziLZdRFsJH+DtSPsYGHWj7AQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjL3XObTM1guRqeFY/12lj2O+zQo/mCdloLHZy+oA+7AiEA9ddAg8LHy+CHtEnyoyOC233u2SHMoe6/nK3BzjBHfLQ="}]},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"feugy","email":"damien.feugas@gmail.com"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"}]},"1.6.3":{"author":{"name":"Feugy"},"name":"swagger-jack","description":"Express compliant tooling to generate swagger Json API and validate Web-layer input/output. Based on json-gate","contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"},{"name":"Simon Lopez","email":"simon.lopez@slopez.org"}],"keywords":["swagger","express","validation","api","descriptor"],"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"license":"MIT","version":"1.6.3","main":"lib/index.js","engines":{"node":"+0.8.0"},"scripts":{"test":"cake test","prepublish":"cake build"},"dependencies":{"async":"0.2.6","coffee-script":"1.6.2","express":"3.1.0","json-gate":"0.8.21","underscore":"1.4.4","request":"2.16.6","rimraf":"2.1.4"},"devDependencies":{"chai":"1.5.0","js-yaml":"2.0.3","mocha":"1.8.2"},"bugs":{"url":"https://github.com/feugy/swagger-jack/issues"},"_id":"swagger-jack@1.6.3","dist":{"shasum":"0fb6ff2480ec7f785226c8bccbe4ac55b14019b9","tarball":"https://registry.npmjs.org/swagger-jack/-/swagger-jack-1.6.3.tgz","integrity":"sha512-NG86CxZYT4Mu0w+Gd/4BAJEzzWzP8kawx7S1uTaTJyEt/NVV46b1fzn0MhMiibizm7nfsxVU+2GwrY5bddYFGg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQDcUEYU3kEXRDXv0iwUV0QdCsbrzloLj2JsnJVqsayrvgIfFuHSVEuy1vlFopQwtxlMI0Ze/d49lY0NbV+FDerM8A=="}]},"_from":"./","_npmVersion":"1.4.4","_npmUser":{"name":"slopez","email":"simon.lopez@slopez.org"},"maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"},{"name":"slopez","email":"simon.lopez@slopez.org"}]}},"readme":"# Swagger for Express\n[![Build Status](https://travis-ci.org/feugy/swagger-jack.png)](https://travis-ci.org/feugy/swagger-jack)\n\n\n[Swagger](http://developers.helloreverb.com/swagger/) is a specification and complete framework implementation for describing, producing, consuming, and visualizing RESTful web services.\n\nIt provides:\n\n* _specification_: to write descriptors of your API\n* _tools_: based on this descriptors: friendly GUI for documentation, client libraries...\n\n**Swagger-Jack** is a nodeJS modules that implements the swagger specification and offers you three middlewares to:\n\n1. _generate_ your routes from a swagger descriptor, binding them to your own controller functions\n2. _validate_ all the API inputs (query parameter, headers, bodies...)\n3. report _errors_ in a consistent way\n\n\n## How can I use it ?\n\nFirst, get the module, by referencing it inside your package.json:\n\n```js\n  \"dependencies\": {\n    \"express\": \"3.1.0\",\n    \"swagger-jack\": \"1.0.0\"\n  }\n```\n\nThen, when creating your Express application, import and configure the two middlewares:\n\n```js\n  var express = require('express'),\n      swagger = require('swagger-jack');\n\n  var app = express();\n  \n  app.use(express.bodyParser())\n    .use(express.methodOverride())\n    .use(swagger.generator(app, {\n      // general descriptor part\n      apiVersion: '2.0',\n      basePath: 'http://my-hostname.com/api'\n    }, [{\n      // descriptor of a given resource\n      api: {\n        resourcePath: '/user'\n        apis: [{\n          path: '/user/'\n          operations: [{\n            httpMethod: 'POST',\n            nickname: 'create'\n          }, {\n            httpMethod: 'GET',\n            nickname: 'list'\n\n          }]\n        }]\n      },\n      // controller for this resource\n      controller:\n        create: function(req, res, next) {\n          // create a new user...\n        },\n        list: function(req, res, next) {\n          // list existing users...\n        }\n    }])\n    .use(swagger.validator(app))\n    .use(swagger.errorHandler())\n  \n  app.get \"/api/unvalidated\", function(req, res, next) {\n    // not documented not validated\n  }\n  app.listen(8080);\n```\n\n\n### Generator middleware\n\nGenerator takes the following parameters:\n\n1. your express application,\n1. a general descriptor object (which is totally not constraint: put whatever you need in it), \n1. an array of \"resources\",\n1. optionnal `options` (see below)\n\nA \"resource\" is composed by a *resource* descriptor, and the corresponding code (what we called *controller*).\n\nThe middleware will automatically add to your express application the routes found inside the *resource* descriptor, and bound them to the provided *controller* (it uses the `nickname` attribute from the descriptor to bound the right controller's method).\n\nIn the previous example, two routes are created:\n\n1. `POST /api/user/` to create a user (controller method `create()`)\n1. `GET /api/user/` to list existing users (controller method `list()`)\n\nAs explained in the swagger specification, the descriptor `basePath` attribute is used as url prefix for every resources and their operations. \nYou should not repeat it in resources paths and apis path.\n\nThe `resourcePath` in resource object is intended to be repeated in every api path.\n\nIf you just want to document some existing routes, just provide a resource descriptor, and no associated controller. \nOf course, no validation will be provided.\n\nYou can still register routes and middleware within your application, like you've used to. \nBut they will not be documented nor validated.\n\nThe following options are available:\n\n- descPath `String`: path of generated swagger descriptor. Must contain leading slash. Default to `/api-docs.json`, with `basePath` used as prefix.\n\n\n### Validator middleware\n\nValidator will analyze the declared parameters of your descriptor, and validate the input.\nIt will handle parameter casting, range validation and declared model compliance (thank to the excellent [json-gate](https://github.com/oferei/json-gate)).\n\nAll casted values (except body parameters) are available inside the controller methods with the `req.input` associative array.\nNo matter if parameter is from path, query or header: it will be present inside `req.input`.\n\nYou can still use the Express original function (`req.params`, `req.param()`, `req.headers`...), but beware: values are just strings.\n\n\nBodies are also validated, but parsing is done by express's bodyParser middleware: it takes in account json and multipart bodies. For other bodies kind, validator will read itself the body, and perfoms casting.\n\n**Caution** You *must* use `express.bodyParser()` *before* `swagger.validator`. \n\n**Caution** You *can't* read the body by yourself (with *data*/*end* request events) for routes declared with `swagger.validator`. \n\nIf you do not need validation, no problem: just remove the validator middleware.\n\n\n### Error middleware\n\nValidation errors (and your custom business errors) are handled by the error middleware.\nIt uses the express's error mecanism: invoke the next() method with an argument.\n\nWeither it's a string or an object, it will be serialized into a json response with an http status (500 by default).\n\nFor example:\n\n```js\n  use(swagger.generator(app, { \n    // general descriptor ... \n  }, [{\n    api: // resource descriptor...\n    controller: {\n      create: function(req, res, next) {\n        if (// error check...) {\n          var err = new Error('forbidden !');\n          err.status = 403;\n          return next(err);\n        }\n        // process ...\n      }\n    }\n  }]))\n```\n\nInput validation errors are reported the same way.\n\nYou may not use the error middleware and provide your own.\n\n\n### Power-tip !\n\nUse js-yaml to store your descriptor in a separate file, and split your code into other controller modules:\n\n```js\n  var express = require('express'),\n      swagger = require('swagger-jack'),\n      yaml = require('js-yaml');\n  \n  var app = express();\n  \n  app.use(express.bodyParser())\n    .use(express.methodOverride())\n    .use(swagger.generator(app, \n      require('/api/general.yml'), \n      [{\n        api: require('/api/users.yml'),\n        controller: require('/controller/users')\n      },{\n        api: require('/api/commands.yml'),\n        controller: require('/controller/commands')\n      }])\n    .use(swagger.validator(app))\n    .use(swagger.errorHandler())\n  \n  app.listen(8080);\n```\n\n\n### Really hacky power-tip\n\nFor very specific cases, it's possible to use the validation function without request.\n\nFor example:\n\n```js\n  // init your application as usual\n  var app = express();\n  var validator; // don't init yet ! the generator was not invoked\n  app.use(express.bodyParser())\n    .use(express.methodOverride())\n    .use(swagger.generator(app,\n      ...\n    , [{\n      api: require('./fixtures/validatedApi.yml'),\n      controller: require('./controller')\n    ])\n    // keep the validator middleware.\n    .use(validator = swagger.validator(app))\n    .use(swagger.errorHandler())\n\n  ...\n\n  // manually validate a \"fake\" url\n  var casted = {};\n  var url = '/api/queryparams';\n  // method, Express path, url, query, headers, body, casted, callback\n  validator.validate('GET', url, url, {param1:\"-2\", param2:\"5.5\"}, {}, {}, casted, function(err) {\n    if (err) {\n      // handle validation errors\n    } else {\n      // you can use casted values safely.\n    }\n  });\n```\n\nYou still need to use an Express application and to declare generator and validator middlewares.\n\nDocumentation for the `validate()` function can be found [in the source code](https://github.com/feugy/swagger-jack/blob/master/src/validator.coffee#L216)\n\n\n## TODO How does it works ?\n\nTo be Done\n\n\n## What about [swagger-node-express](https://github.com/wordnik/swagger-node-express) ?\n\nReverb folks (the ones who made Swagger) provide an express module to enhance your Express application by returning the swagger descriptor.\n\nIt provides a quick way to describe your code in Json and register your express routes.\nTo me it's very handy for a start, but has three problems:\n\n1. your descriptor is inside your code, and splitted into parts, which makes it not easy to read\n2. you do not use any more the marvellous express functions, but the one provided by swagger-node-epxress\n3. it does not use the descriptor to automatize input validation, and you still have to cast and check your parameters\n\n\n## Changelog\n\n### 1.6.2\n\n- fix mising leading / on generated descriptor, when using non empty basePath  ([details](https://github.com/feugy/swagger-jack/issues/19))\n\n### 1.6.1\n\n- do not prepend basePath to api's path with swagger root descriptor ([details](https://github.com/feugy/swagger-jack/issues/19))\n- enforce validator on api declared with basePath\n\n### 1.6.0\n\n- fix basePath handling, be more strict on operation path validation ([details](https://github.com/feugy/swagger-jack/issues/10))\n- allow validation utilities to be used without Express's request object ([details](https://github.com/feugy/swagger-jack/issues/11))\n\n### 1.5.0\n\n- more strict check for mandatory data inside descriptors\n- test missing models that are referenced in apis\n\n### 1.4.2\n\n- only expose relevant models inside the swagger descriptor for a given resource ([details](https://github.com/feugy/swagger-jack/pull/9))\n- be less restrictive on model content ([details](https://github.com/feugy/swagger-jack/pull/8))\n\n### 1.4.1\n\n- check model id unicity to avoid erasure\n- allow apis to contain unwired resources. Allow to document handy-managed routes\n\n### 1.4.0\n\n- use CakeFile for better build/test portability\n- enhance documentation\n- allow swagger descriptor path customization ([details](https://github.com/feugy/swagger-jack/issues/6))\n\n### 1.3.1\n\n- fix when req.body is undefined ([details](https://github.com/feugy/swagger-jack/pull/4))\n\n### 1.3.0\n\n- allow anonymous complex bodies to have multiple occurences \n\n### 1.2.0\n\n- allow body parameter to be facultative\n- fix packaging issues with coffee. Only contributors need to install it globally (as well as mocha)\n\n### 1.1.0\n\n- be more strict regarding multipart management \n\n### 1.0.1\n\n- add some test on multipart/related body parsing \n- enhance documentation\n- use [Travis CI](https://travis-ci.org/feugy/swagger-jack)\n\n\n## License (MIT)\n\nSwagger is shipped with an MIT Licence. \n\nCopyright (c) 2013 Atos Worldline\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n--------\n### Addendum: what's with that name ?\n\nWe looked for a fun and yet eloquent name. But swagger.js was already used.\n[Jack Swagger](http://www.wwe.com/superstars/jackswagger) is an american catch superstar, and we never heard about him before, but it perfectly fits your naming goals :)\n","maintainers":[{"name":"feugy","email":"damien.feugas@gmail.com"},{"name":"slopez","email":"simon.lopez@slopez.org"}],"time":{"modified":"2022-06-27T02:45:10.444Z","created":"2013-02-11T16:37:26.598Z","1.0.0":"2013-02-11T16:37:28.637Z","1.0.1":"2013-02-19T08:39:21.921Z","1.1.0":"2013-02-19T16:16:35.412Z","1.2.0":"2013-02-20T14:03:25.716Z","1.3.0":"2013-02-21T14:34:19.592Z","1.3.1":"2013-03-15T15:39:13.743Z","1.4.0":"2013-03-21T15:52:05.655Z","1.4.1":"2013-03-25T13:18:40.751Z","1.4.2":"2013-03-29T10:49:04.073Z","1.5.0":"2013-04-03T14:35:47.020Z","1.6.0":"2013-05-13T09:11:04.716Z","1.6.1":"2013-05-21T15:53:45.201Z","1.6.2":"2013-06-20T09:57:58.357Z","1.6.3":"2014-06-25T11:34:58.530Z"},"author":{"name":"Feugy"},"repository":{"type":"git","url":"https://github.com/feugy/swagger-jack"},"keywords":["swagger","express","validation","api","descriptor"],"contributors":[{"name":"Filirom1","email":"filirom1@gmail.com"},{"name":"Simon Lopez","email":"simon.lopez@slopez.org"}],"bugs":{"url":"https://github.com/feugy/swagger-jack/issues"},"license":"MIT","readmeFilename":"README.md"}