# webapi-parser

> WebApi Parser

Latest version **0.5.0** (published 2020-01-31) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install webapi-parser
pnpm add webapi-parser
yarn add webapi-parser
bun add webapi-parser
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2020-01-31 |
| First published | 2019-05-09 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.3 MB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 70 |
| Author | MuleSoft |
| Maintainers | jstoiko |

## Links

- npm: https://www.npmjs.com/package/webapi-parser
- Repository: https://github.com/raml-org/webapi-parser
- Issues: https://github.com/raml-org/webapi-parser/issues
- npm.io page: https://npm.io/package/webapi-parser

## Dependencies (1)

- [ajv](https://npm.io/package/ajv.md) 6.5.2

## Recent versions

- 0.5.0 (latest) — 2020-01-31
- 0.0.1-beta.9 (beta) — 2019-05-13
- 0.4.1 — 2020-01-14
- 0.4.0 — 2019-12-02
- 0.3.2 — 2019-10-10
- 0.3.1 — 2019-09-23
- 0.3.0 — 2019-09-17
- 0.2.0 — 2019-07-23
- 0.1.0 — 2019-05-30
- 0.0.2 — 2019-05-13
- 0.0.1 — 2019-05-13
- 0.0.1-beta.8 — 2019-05-13
- 0.0.1-beta.7 — 2019-05-13
- 0.0.1-beta.6 — 2019-05-13
- 0.0.1-beta.5 — 2019-05-13
- … 6 more at https://npm.io/package/webapi-parser/versions

## README

# `webapi-parser`

[![Build status](https://img.shields.io/travis/raml-org/webapi-parser.svg?style=flat)](https://travis-ci.org/raml-org/webapi-parser)
[![Coverage Status](https://coveralls.io/repos/github/raml-org/webapi-parser/badge.svg?branch=master)](https://coveralls.io/github/raml-org/webapi-parser?branch=master)

API Spec parser based on [AMF](https://github.com/aml-org/amf). Currently supports RAML 0.8, RAML 1.0, OAS 2.0 and OAS 3.0(beta).

This project is a thin wrapper that exposes API Spec-related capabilities from [AMF](https://github.com/aml-org/amf). It is written in Scala and offered in two versions: [JavaScript](#javascript) and [Java](#java).

## 📃 Documentation
|      | JavaScript | Java |
| ---- | ---------- | ---- |
| **Installation** | [NPM](#javascript) | [Gradle/Maven](#java) |
| **Object-oriented interface** | ["WebApi" Model](https://raml-org.github.io/webapi-parser/js/classes/_webapi_parser_.webapibaseunit.html) | ["WebApi" Model](https://raml-org.github.io/webapi-parser/js/classes/_webapi_parser_.webapibaseunit.html) |
| **Package** | [![NPMJS](https://img.shields.io/npm/v/webapi-parser.svg?style=flat)](https://www.npmjs.com/package/webapi-parser) | [![Maven Central](https://img.shields.io/static/v1.svg?style=flat&logo=java&label=%20&labelColor=white&labelColor=007396&color=007396&message=Maven%20Central)](https://search.maven.org/artifact/org.raml/webapi-parser/) |
| **Examples** | [JavaScript examples](./examples/js/README.md) | [Java examples](./examples/java/README.md) |
| **Developer Documentation** | [JavaScript Typedoc](https://raml-org.github.io/webapi-parser/js/modules/_webapi_parser_.html) | [Javadocs](https://raml-org.github.io/webapi-parser/java/index.html) |

## 📦 Examples
* [Resolving a "WebApi" Model](https://raml-org.github.io/webapi-parser/resolving.html)
* [Navigating a "WebApi" Model](https://raml-org.github.io/webapi-parser/navigating.html)
* [Constructing a "WebApi" Model](https://raml-org.github.io/webapi-parser/constructing.html)
* [Translating RAML DataTypes to JSON Schemas](https://raml-org.github.io/webapi-parser/translating-raml-json.html)
* [Translating JSON Schemas to RAML DataTypes](https://raml-org.github.io/webapi-parser/translating-json-raml.html)
* [More examples](./examples)

## 🛠 Installation

### JavaScript
Install the npm package:

```sh
$ npm install webapi-parser
```

and require/reference as follows:
```js
const wap = require('webapi-parser').WebApiParser
```

Usage examples are located in the [examples directory](./examples/js/README.md).

### Java
Specify `webapi-parser` as a dependency and set both MuleSoft and Jitpack repositories.

Gradle:
```groovy
dependencies {
    compile 'org.raml:webapi-parser:x.y.z'
}
...
repositories {
    maven {
        url "https://repository-master.mulesoft.org/nexus/content/repositories/releases"
    }
    maven {
        url "https://jitpack.io"
    }
    mavenCentral()
}
```

Maven:
```xml
<dependency>
    <groupId>org.raml</groupId>
    <artifactId>webapi-parser</artifactId>
    <version>X.Y.Z</version>
</dependency>
...
<repositories>
    <repository>
        <id>MuleSoftReleases</id>
        <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases</url>
    </repository>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
```

To install snapshot versions set additional Sonatype snapshots repository.

Gradle:
```groovy
...
repositories {
    ...
    maven {
        url 'https://oss.sonatype.org/content/repositories/snapshots'
    }
}
```

Maven:
```xml
...
<repositories>
    ...
    <repository>
        <id>SonatypeSnapshots</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
</repositories>
```

Usage examples are located in the [examples directory](./examples/java/README.md).

---

If you wish to contribute to this project, please review our [Contribution Guidelines](./CONTRIBUTING.md).

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