# wadl2json

> Convert WADL strings, objects and files to JSON.

Latest version **1.0.4** (published 2017-07-31) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install wadl2json
pnpm add wadl2json
yarn add wadl2json
bun add wadl2json
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2017-07-31 |
| First published | 2014-04-14 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+7 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Rodolphe Belouin |
| Maintainers | rbelouin, blackyoup, clementd |
| Keywords | convert, wadl, json, api |

## Links

- npm: https://www.npmjs.com/package/wadl2json
- Repository: https://github.com/CleverCloud/wadl2json
- Issues: https://github.com/CleverCloud/wadl2json/issues
- npm.io page: https://npm.io/package/wadl2json

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) ^3.10.0
- [request](https://npm.io/package/request.md) ^2.60.0
- [xml2json](https://npm.io/package/xml2json.md) ^0.7.1
- [js-beautify](https://npm.io/package/js-beautify.md) ^1.5.10

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.4 (latest) — 2017-07-31
- 1.0.3 — 2015-08-21
- 1.0.2 — 2015-07-28
- 1.0.1 — 2015-07-22
- 1.0.0 — 2015-07-21
- 0.2.2 — 2015-07-21
- 0.2.1 — 2015-01-21
- 0.2.0 — 2015-01-20
- 0.1.1 — 2014-07-24
- 0.1.0 — 2014-04-14

## README

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.

See [rbelouin/wadl-client](https://github.com/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:

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

---
_Source: https://npm.io/package/wadl2json · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
