wadl2json

1.0.4 • Public • Published

wadl2json

Build Status

Convert a remote WADL file into a JSON equivalent. See the swagger spec for further information about the format of the JSON returned.

See rbelouin/wadl-client for generating a javascript client from a swagger json file.

How to use it

You can parse a WADL string, a WADL file, or a remote WADL file:

var wadl2json = require("wadl2json");
 
var options = {
  sort: false, // set it to true if you want to sort operations and verbs in the alphabetical order
  stringify: false, // set it to true if you want to get a string instead of an object
  prettify: false, // set it to true if you want to get an indented string (stringify=true required)
 
  title: "Simple API", // the title of the API (required)
  description: "Simple API description", // the description of the API (required)
  version: "1.4.2", // the version of the API (required)
 
  blacklist: ["/internal"] // the path roots you want to blacklist
};
 
var swaggerFromString = wadl2json.fromString("<wadl content>", options);
var swaggerFromFile = wadl2json.fromFile("./wadl-content.wadl", options);
var swaggerFromURL = wadl2json.fromURL("http://example.com/application.wadl", options);

How to build

Please install node and npm on your system. Then:

  npm install
  npm test

Dependencies (4)

Dev Dependencies (5)

Package Sidebar

Install

npm i wadl2json

Weekly Downloads

5

Version

1.0.4

License

BSD-3-Clause

Last publish

Collaborators

  • miton18
  • heleneamouzou
  • pdesoyres-cc
  • roberttran-cc
  • flsan
  • judu
  • blackyoup
  • galimede
  • clevercloud-ci
  • hsablonniere
  • kannarfr