# raml-1-parser

> DEPRECATION NOTICE: please note that this parser is now deprecated, please use [webapi-parser](https://github.com/raml-org/webapi-parser) instead.

Latest version **1.1.67** (published 2020-07-10) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install raml-1-parser
pnpm add raml-1-parser
yarn add raml-1-parser
bun add raml-1-parser
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.67 |
| Published | 2020-07-10 |
| First published | 2015-12-15 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 24 |
| Unpacked size | 5.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 135 |
| Maintainers | cesaraugustogarcia, christianvogel, denis.denisenko, petrochenko-pavel-a |
| Keywords | raml, js, raml-parser, parser, typescript |

## Links

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

## Dependencies (24)

- [q](https://npm.io/package/q.md) 1.5.1
- [xhr2](https://npm.io/package/xhr2.md) 0.2.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.3
- [fs-extra](https://npm.io/package/fs-extra.md) 8.1.0
- [loophole](https://npm.io/package/loophole.md) 1.1.0
- [lrucache](https://npm.io/package/lrucache.md) 1.0.3
- [ts-model](https://npm.io/package/ts-model.md) 0.0.18
- [z-schema](https://npm.io/package/z-schema.md) ^4.2.2
- [invariant](https://npm.io/package/invariant.md) 2.2.4
- [json-path](https://npm.io/package/json-path.md) 0.1.3
- [pluralize](https://npm.io/package/pluralize.md) 8.0.0
- [underscore](https://npm.io/package/underscore.md) ^1.10.2
- [change-case](https://npm.io/package/change-case.md) ^4.1.1
- [media-typer](https://npm.io/package/media-typer.md) 1.1.0
- [xmldom-alpha](https://npm.io/package/xmldom-alpha.md) ^0.1.28
- [urlsafe-base64](https://npm.io/package/urlsafe-base64.md) 1.0.0
- [xmlhttprequest](https://npm.io/package/xmlhttprequest.md) 1.8.0
- [yaml-ast-parser](https://npm.io/package/yaml-ast-parser.md) 0.0.43
- [promise-polyfill](https://npm.io/package/promise-polyfill.md) 8.1.3
- [upper-case-first](https://npm.io/package/upper-case-first.md) ^2.0.1
- [http-response-object](https://npm.io/package/http-response-object.md) 3.0.2
- [json-stable-stringify](https://npm.io/package/json-stable-stringify.md) 1.0.1
- [raml-definition-system](https://npm.io/package/raml-definition-system.md) ^0.0.94
- [json-schema-compatibility](https://npm.io/package/json-schema-compatibility.md) 1.1.0

## 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.1.67 (latest) — 2020-07-10
- 0.2.8-rc2 (beta) — 2016-05-06
- 1.1.66 — 2020-04-30
- 1.1.65 — 2020-04-07
- 1.1.64 — 2020-03-31
- 1.1.63 — 2020-03-20
- 1.1.62 — 2020-03-18
- 1.1.61 — 2020-03-10
- 1.1.60 — 2020-01-03
- 1.1.59 — 2019-12-18
- 1.1.58 — 2019-10-24
- 1.1.57 — 2019-09-25
- 1.1.56 — 2019-07-25
- 1.1.55 — 2019-07-03
- 1.1.54 — 2019-07-03
- … 99 more at https://npm.io/package/raml-1-parser/versions

## README

DEPRECATION NOTICE: please note that this parser is now deprecated, please use [webapi-parser](https://github.com/raml-org/webapi-parser) instead.

—-
# RAML 1.0 JS Parser

[![Build Status](https://travis-ci.org/raml-org/raml-js-parser-2.svg?branch=master)](https://travis-ci.org/raml-org/raml-js-parser-2) [![Greenkeeper badge](https://badges.greenkeeper.io/raml-org/raml-js-parser-2.svg)](https://greenkeeper.io/)

See http://raml.org for more information about RAML.

This parser supports both RAML 0.8 and 1.0.

## Quick start
Install the parser: `npm install raml-1-parser`

Create new file test.js with the following code:

```
var raml = require("raml-1-parser");
var apiJSON = raml.load(ramlFileName);
console.log(JSON.stringify(apiJSON, null, 2));
```

where `ramlFileName` is a path to RAML file.

Run the test: `node ./test.js`

## Installation
```
npm install raml-1-parser

node node_modules/raml-1-parser/test/test01.js  //synchronously loads XKCD API from local file system and prints its JSON representation
node node_modules/raml-1-parser/test/testAsync01.js  //asynchronously loads XKCD API from local file system and prints its JSON representation
node node_modules/raml-1-parser/test/test02.js  //synchronously loads XKCD API from github and prints its JSON representation
node node_modules/raml-1-parser/test/testAsync02.js  //asynchronously loads XKCD API from github and prints its JSON representation


```

## Usage
* For parser usage example refer to `node_modules/raml-1-parser/test/test01.js`
* For asynchrounous usage example refer to `node_modules/raml-1-parser/test/testAsync01.js`

Parser documentation: https://raml-org.github.io/raml-js-parser-2/

Parser JSON output schema: https://github.com/raml-org/raml-js-parser-2/blob/master/tckJsonSchema/tckJsonSchema.json

Getting started guide: https://github.com/raml-org/raml-js-parser-2/blob/master/documentation/GettingStarted.md

High-level usage example: https://github.com/raml-org/raml-js-parser-2/blob/master/examples/highlevel-AST-usage/tutorial.md

Validation plugins usage example: https://github.com/raml-org/raml-js-parser-2/blob/master/examples/validationPlugins

## Creating standalone browser package

Clone repository: `git clone https://github.com/raml-org/raml-js-parser-2.git`

Install modules: `npm install`

Build : `npm run build`

Generate browser package: `npm run generateBrowserVersion`, this will generate the package in `browserVersion` folder.

To generate debug-friendly browser package: `npm run generateBrowserVersionDev`

## Setting up parser development environment

Clone repositories:
* `git clone https://github.com/mulesoft-labs/yaml-ast-parser.git`
* `git clone https://github.com/mulesoft-labs/ts-model.git`
* `git clone https://github.com/mulesoft-labs/ts-structure-parser.git`
* `git clone https://github.com/raml-org/raml-typesystem.git`
* `git clone https://github.com/raml-org/raml-definition-system.git`
* `git clone https://github.com/raml-org/raml-js-parser-2.git`

For each repository, preserving the order:
* Install modules: `npm install`
* Set up npm link: `npm link`

For each repository, preserving the order:
* Open dependencies: `cd node_modules`
* For each module `<module_name>` in `node_modules` belonging to the list above: `rm -rf <module_name>`
* For each module `<module_name>` in `node_modules` belonging to the list above: `npm link <module_name>`

For each repository, preserving the order:
* Build : `npm run build`

How to test: `gulp test`

## Launching TCK tests

Execute `npm run tck` in the commend line.
The script clones the `master` branch of the TCK repository to the `TCK` subfolder of the project and executes all the tests. The report file is `TCK/report.json`.

## Contributing
If you are interested in contributing some code to this project, thanks! Please first [read and accept the Contributors Agreement](https://api-notebook.anypoint.mulesoft.com/notebooks#bc1cf75a0284268407e4).

To discuss this project, please use its [github issues](https://github.com/raml-org/raml-js-parser-2/issues) or the [RAML forum](http://forums.raml.org/).

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