<commit_before>wadl2json
=========

[![Build Status](https://travis-ci.org/rbelouin/wadl2json.svg?branch=js)](https://travis-ci.org/rbelouin/wadl2json)

Convert a remote WADL file into a JSON equivalent

How to build
------------

Please install [node](http://nodejs.org/), [npm](https://www.npmjs.org/) and [grunt](http://gruntjs.com/) on your system.
Then:

```sh
  npm install
  npm test
```
<commit_msg>Add some documentation.<commit_after>wadl2json
=========

[![Build Status](https://travis-ci.org/rbelouin/wadl2json.svg?branch=js)](https://travis-ci.org/rbelouin/wadl2json)

Convert a remote WADL file into a JSON equivalent. See the [swagger spec](https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md) for further information about the format of the JSON returned.

How to use it
-------------

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

```js
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](http://nodejs.org/) and [npm](https://www.npmjs.org/) on your system.
Then:

```sh
  npm install
  npm test
```

{'fraction_non_alphanumeric': 0.15828092243186584, 'fraction_numerical': 0.008385744234800839, 'mean_word_length': 3.8575063613231553, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 7, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1610463', 'n_tokens_mistral': 653, 'n_tokens_neox': 626, 'n_words': 199}