Merge pull request #1067 from mohsen1/use-swagger-js-from-npm

Use SwaggerJS from npm
This commit is contained in:
Tony Tam
2015-03-25 15:13:39 -07:00
16 changed files with 19051 additions and 37806 deletions

View File

@@ -1,4 +1,5 @@
node_modules
src/main/javascript/doc.js
dist
lib
lib
.log

4
dist/index.html vendored
View File

@@ -9,7 +9,6 @@
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
<link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
<script type="text/javascript" src="lib/shred.bundle.js"></script>
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
@@ -17,13 +16,10 @@
<script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
<script src='lib/underscore-min.js' type='text/javascript'></script>
<script src='lib/backbone-min.js' type='text/javascript'></script>
<script src='lib/swagger-client.js' type='text/javascript'></script>
<script src='swagger-ui.js' type='text/javascript'></script>
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
<script src='lib/marked.js' type='text/javascript'></script>
<!-- enabling this will enable oauth2 implicit scope support -->
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
<script type="text/javascript">
$(function () {
var url = window.location.search.match(/url=([^&]+)/);

2765
dist/lib/shred.bundle.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

19027
dist/swagger-ui.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -54,7 +54,10 @@ function templates() {
gulp.task('dist', ['clean'], function() {
return es.merge(
gulp.src('./src/main/javascript/**/*.js'),
gulp.src([
'./src/main/javascript/**/*.js',
'./node_modules/swagger-client/browser/swagger-client.js'
]),
templates()
)
.pipe(order(['scripts.js', 'templates.js']))

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -6,10 +6,11 @@
"homepage": "http://swagger.io",
"license": "Apache 2.0",
"scripts": {
"build": "./node_modules/gulp/bin/gulp.js;",
"serve": "./node_modules/gulp/bin/gulp.js serve;",
"build": "gulp.js;",
"serve": "gulp.js serve;",
"pretest": "jshint .",
"test": "./node_modules/gulp/bin/gulp.js; ./node_modules/mocha/bin/mocha"
"test": "gulp; mocha",
"postinstall": "cd node_modules/swagger-client/; npm install; gulp"
},
"repository": {
"type": "git",
@@ -43,6 +44,7 @@
"http-server": "git+https://github.com/nodeapps/http-server.git",
"less": "^2.4.0",
"mocha": "^2.1.0",
"selenium-webdriver": "^2.45.0"
"selenium-webdriver": "^2.45.0",
"swagger-client": "git://github.com/swagger-api/swagger-js#develop_2.0"
}
}

View File

@@ -9,7 +9,6 @@
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
<link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
<script type="text/javascript" src="lib/shred.bundle.js"></script>
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
@@ -17,13 +16,10 @@
<script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
<script src='lib/underscore-min.js' type='text/javascript'></script>
<script src='lib/backbone-min.js' type='text/javascript'></script>
<script src='lib/swagger-client.js' type='text/javascript'></script>
<script src='swagger-ui.js' type='text/javascript'></script>
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
<script src='lib/marked.js' type='text/javascript'></script>
<!-- enabling this will enable oauth2 implicit scope support -->
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
<script type="text/javascript">
$(function () {
var url = window.location.search.match(/url=([^&]+)/);

View File

@@ -20,7 +20,7 @@ describe('swagger 1.x spec tests', function () {
before(function (done) {
this.timeout(25 * 1000);
servers.start('/v1.2/petstore/api-docs', done);
servers.start('/v1.2/petstore/api-docs.json', done);
});
afterEach(function(){

View File

@@ -3,15 +3,15 @@
"swaggerVersion": "1.2",
"apis": [
{
"path": "http://localhost:8081/v1.2/petstore/pet",
"path": "http://localhost:8081/v1.2/petstore/pet.json",
"description": "Operations about pets"
},
{
"path": "http://localhost:8081/v1.2/petstore/user",
"path": "http://localhost:8081/v1.2/petstore/user.json",
"description": "Operations about user"
},
{
"path": "http://localhost:8081/v1.2/petstore/store",
"path": "http://localhost:8081/v1.2/petstore/store.json",
"description": "Operations about store"
}
],