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

wadl-client

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wadl-client - npm Package Compare versions

Comparing version 0.2.2 to 1.0.0

spec/swagger.js

2

bower.json
{
"name": "wadl-client",
"main": "wadl-client.js",
"version": "0.2.2",
"version": "1.0.0",
"homepage": "https://github.com/rbelouin/wadl-client",

@@ -6,0 +6,0 @@ "authors": [

@@ -29,3 +29,3 @@ module.exports = function(grunt) {

default: {
src: ["spec/browser-dependencies.js", "spec/resources.js", "wadl-client.js"],
src: ["spec/browser-dependencies.js", "spec/swagger.js", "wadl-client.js"],
options: {

@@ -32,0 +32,0 @@ host: "http://localhost:3000/",

{
"name": "wadl-client",
"version": "0.2.2",
"version": "1.0.0",
"description": "Generate a Javascript client for a web API providing a WADL description",

@@ -5,0 +5,0 @@ "main": "wadl-client.js",

@@ -8,6 +8,14 @@ wadl-client

See [rbelouin/wadl2json](https://github.com/rbelouin/wadl2json) for generating a swagger json from a WADL file.
How to use
----------
There is no documentation at the moment.
Please refer to the tests for learning how to use the wadl-client.
How to build
------------
Please install [node](http://nodejs.org/), [npm](https://www.npmjs.org/) and [grunt](http://gruntjs.com/) on your system.
Please install [node](http://nodejs.org/) and [npm](https://www.npmjs.org/) on your system.
Then:

@@ -14,0 +22,0 @@

@@ -1,6 +0,6 @@

var resources = resources || require("./resources.js");
var swagger = swagger || require("./swagger.js");
var WadlClient = WadlClient || require("../wadl-client.js");
var Bacon = Bacon || require("baconjs");
var client = WadlClient.buildClient(resources, {
var client = WadlClient.buildClient(swagger, {
host: "http://localhost:3000"

@@ -38,3 +38,3 @@ });

it("should be able to download resources by giving specific header at building time", function(done) {
var client = WadlClient.buildClient(resources, {
var client = WadlClient.buildClient(swagger, {
host: "http://localhost:3000",

@@ -215,3 +215,3 @@ headers: {

it("must call the beforeSend hook, if it's defined", function(done) {
var client = WadlClient.buildClient(resources, {
var client = WadlClient.buildClient(swagger, {
host: "http://localhost:3000",

@@ -218,0 +218,0 @@ hooks: {

@@ -266,4 +266,5 @@ var WadlClient = (function() {

WadlClient.buildClient = function(endpoints, settings) {
WadlClient.buildClient = function(swagger, settings) {
var client = {};
var endpoints = swagger.paths;

@@ -280,5 +281,5 @@ for(var path in endpoints) {

var methods = endpoints[path];
for(var i = 0; i < methods.length; i++) {
var method = methods[i];
node[method.verb.toLowerCase()] = prepareRequest(method.verb, path, settings || {});
for(var verb in methods) {
var method = methods[verb];
node[verb.toLowerCase()] = prepareRequest(verb.toUpperCase(), path, settings || {});
}

@@ -285,0 +286,0 @@ }

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