swagger-client
Advanced tools
Comparing version 2.1.0-M1 to 2.1.0-M2.alpha1
@@ -5,3 +5,3 @@ { | ||
"description": "swagger.js is a javascript client for use with swaggering APIs.", | ||
"version": "2.1.0-M1", | ||
"version": "2.1.0-M2.alpha1", | ||
"homepage": "http://swagger.io", | ||
@@ -12,3 +12,3 @@ "repository": { | ||
}, | ||
"main": "lib/swagger-client.js", | ||
"main": "index.js", | ||
"scripts": { | ||
@@ -19,2 +19,7 @@ "build": "gulp build", | ||
}, | ||
"files": [ | ||
"LICENSE", | ||
"lib", | ||
"index.js" | ||
], | ||
"engines": { | ||
@@ -24,22 +29,27 @@ "node": ">= 0.6.6" | ||
"dependencies": { | ||
"shred": "0.8.10", | ||
"btoa": "1.1.1" | ||
"btoa": "^1.1.2", | ||
"cookiejar": "^2.0.1", | ||
"jquery": "^2.1.3", | ||
"lodash-compat": "^3.5.0", | ||
"superagent": "^0.21.0" | ||
}, | ||
"devDependencies": { | ||
"async": "^0.9.0", | ||
"brfs": "^1.4.0", | ||
"browserify": "^9.0.3", | ||
"del": "^1.1.1", | ||
"expect": "1.4.0", | ||
"gulp": "^3.8.10", | ||
"gulp-header": "1.2.2", | ||
"gulp-concat": "^2.4.3", | ||
"gulp-buffer": "0.0.2", | ||
"gulp-header": "^1.2.2", | ||
"gulp-istanbul": "^0.5.0", | ||
"gulp-jshint": "^1.9.0", | ||
"gulp-mocha": "^2.0.0", | ||
"gulp-rename": "^1.2.0", | ||
"gulp-uglify": "^1.0.2", | ||
"gulp-util": "^3.0.1", | ||
"gulp-wrap": "0.10.1", | ||
"jshint-stylish": "^1.0.1", | ||
"mocha": "^1.21.3", | ||
"unit.js": "1.1.2" | ||
"uglifyify": "^3.0.1", | ||
"unit.js": "1.1.2", | ||
"vinyl-source-stream": "^1.1.0" | ||
}, | ||
"license": "apache 2.0" | ||
} |
@@ -28,7 +28,5 @@ # Swagger JS library | ||
var swagger = new client.SwaggerClient({ | ||
url: 'http://petstore.swagger.wordnik.com/v2/swagger.json', | ||
url: 'http://petstore.swagger.io/v2/swagger.json', | ||
success: function() { | ||
if(swagger.ready === true) { | ||
swagger.apis.pet.getPetById({petId:1}); | ||
} | ||
swagger.apis.pet.getPetById({petId:1}); | ||
} | ||
@@ -89,10 +87,8 @@ }); | ||
window.swagger = new SwaggerClient({ | ||
url: "http://petstore.swagger.wordnik.com/api/api-docs", | ||
url: "http://petstore.swagger.io/api/api-docs", | ||
success: function() { | ||
if(swagger.ready === true) { | ||
// upon connect, fetch a pet and set contents to element "mydata" | ||
swagger.apis.pet.getPetById({petId:1}, function(data) { | ||
document.getElementById("mydata").innerHTML = data.content.data; | ||
}); | ||
} | ||
// upon connect, fetch a pet and set contents to element "mydata" | ||
swagger.apis.pet.getPetById({petId:1}, function(data) { | ||
document.getElementById("mydata").innerHTML = JSON.stringify(data.obj); | ||
}); | ||
} | ||
@@ -115,3 +111,3 @@ }); | ||
```js | ||
var body = "<Pet><id>2</id><name>monster</name></Pet>"; | ||
var pet = "<Pet><id>2</id><name>monster</name></Pet>"; | ||
@@ -178,16 +174,19 @@ swagger.apis.pet.addPet({body: pet}, {requestContentType:"application/xml"}); | ||
# Run the test suite | ||
# Run lint (will not fail if there are errors/warnings), tests (without coverage) and builds the browser binaries | ||
gulp | ||
# Run the test suite (without coverage) | ||
gulp test | ||
# Build the library (minified and unminified) in the dist folder | ||
# Build the browser binaries (One for development with source maps and one that is minified and without source maps) in the browser directory | ||
gulp build | ||
# continuously run the test suite: | ||
# Continuously run the test suite: | ||
gulp watch | ||
# run jshint report | ||
# Run jshint report | ||
gulp lint | ||
# run a coverage report | ||
gulp cover | ||
# Run a coverage report based on running the unit tests | ||
gulp coverage | ||
``` | ||
@@ -194,0 +193,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
1
0
1
91429
5
16
13
2542
205
+ Addedcookiejar@^2.0.1
+ Addedjquery@^2.1.3
+ Addedlodash-compat@^3.5.0
+ Addedsuperagent@^0.21.0
+ Addedasync@0.9.2(transitive)
+ Addedbtoa@1.2.1(transitive)
+ Addedcombined-stream@0.0.7(transitive)
+ Addedcomponent-emitter@1.1.2(transitive)
+ Addedcookiejar@2.0.12.1.4(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddelayed-stream@0.0.5(transitive)
+ Addedextend@1.2.1(transitive)
+ Addedform-data@0.1.3(transitive)
+ Addedformidable@1.0.14(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@0.0.1(transitive)
+ Addedjquery@2.2.4(transitive)
+ Addedlodash-compat@3.10.2(transitive)
+ Addedmethods@1.0.1(transitive)
+ Addedmime@1.2.11(transitive)
+ Addedms@2.0.0(transitive)
+ Addedqs@1.2.0(transitive)
+ Addedreadable-stream@1.0.27-1(transitive)
+ Addedreduce-component@1.0.1(transitive)
+ Addedstring_decoder@0.10.31(transitive)
+ Addedsuperagent@0.21.0(transitive)
- Removedshred@0.8.10
- Removedax@0.1.8(transitive)
- Removedbtoa@1.1.1(transitive)
- Removedcookiejar@1.3.1(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedshred@0.8.10(transitive)
- Removedsprintf@0.1.1(transitive)
Updatedbtoa@^1.1.2