Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

swagger-client

Package Overview
Dependencies
Maintainers
1
Versions
295
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-client - npm Package Compare versions

Comparing version 2.1.0-M1 to 2.1.0-M2.alpha1

index.js

32

package.json

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc