Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raml-org/webapi-parser
API Spec parser based on AMF. Currently supports RAML 0.8, RAML 1.0, OAS 2.0 and OAS 3.0(beta).
https://github.com/raml-org/webapi-parser
Last synced: 8 days ago
JSON representation
API Spec parser based on AMF. Currently supports RAML 0.8, RAML 1.0, OAS 2.0 and OAS 3.0(beta).
- Host: GitHub
- URL: https://github.com/raml-org/webapi-parser
- Owner: raml-org
- License: other
- Archived: true
- Created: 2018-07-23T17:26:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T14:28:21.000Z (over 2 years ago)
- Last Synced: 2024-04-24T19:11:41.231Z (7 months ago)
- Language: Scala
- Homepage:
- Size: 5.7 MB
- Stars: 65
- Watchers: 8
- Forks: 24
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# `webapi-parser`
[![Build status](https://img.shields.io/travis/raml-org/webapi-parser/master.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/webapibaseunit.html) | ["WebApi" Model](https://raml-org.github.io/webapi-parser/js/classes/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/webapiparser.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)
* [Migration guide (JS)](https://raml-org.github.io/webapi-parser/migration-guide-js.html)
* [Migration guide (Java)](https://raml-org.github.io/webapi-parser/migration-guide-java.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:
```xmlorg.raml
webapi-parser
X.Y.Z...
MuleSoftReleases
https://repository-master.mulesoft.org/nexus/content/repositories/releases
jitpack.io
https://jitpack.io
```
To install snapshot versions set additional Sonatype snapshots repository.
Gradle:
```groovy
...
repositories {
...
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
```Maven:
```xml
......
SonatypeSnapshots
https://oss.sonatype.org/content/repositories/snapshots
```
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).