Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mulesoft-labs/raml-javascript-generator
Generate a JavaScript API client from RAML
https://github.com/mulesoft-labs/raml-javascript-generator
raml raml-build raml-codegen raml-tooling
Last synced: 3 months ago
JSON representation
Generate a JavaScript API client from RAML
- Host: GitHub
- URL: https://github.com/mulesoft-labs/raml-javascript-generator
- Owner: mulesoft-labs
- License: other
- Archived: true
- Created: 2015-05-08T20:51:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-08T04:31:33.000Z (over 1 year ago)
- Last Synced: 2024-07-27T08:33:07.508Z (4 months ago)
- Topics: raml, raml-build, raml-codegen, raml-tooling
- Language: TypeScript
- Size: 3.11 MB
- Stars: 33
- Watchers: 380
- Forks: 19
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# RAML JavaScript Generator
[![Greenkeeper badge](https://badges.greenkeeper.io/mulesoft-labs/raml-javascript-generator.svg)](https://greenkeeper.io/)
[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]> Generate a JavaScript API client from RAML.
## Installation
```
npm install raml-javascript-generator -g
```## Usage
This module depends on [raml-generator](https://github.com/mulesoft-labs/raml-generator) and can be used globally or locally with JavaScript.
* Chained DSL generation
* `README.md` output
* Support for `client.methodName` and `client.displayName` annotations
* Emits OAuth 2.0 client wrappers### Global
```
raml-javascript-generator api.raml -o js-client
```### Locally
```js
var jsGenerator = require('raml-javascript-generator')var output = jsGenerator(/* api, data */)
```## Generated Client Logging
Generated clients support logging of requests performed. To activate the logging set the `NODE_DEBUG` environment variable to the name of the generated client.
The data for the request performed and the response received will be displayed in the output.
## License
Apache License 2.0
[npm-image]: https://img.shields.io/npm/v/raml-javascript-generator.svg?style=flat
[npm-url]: https://npmjs.org/package/raml-javascript-generator
[downloads-image]: https://img.shields.io/npm/dm/raml-javascript-generator.svg?style=flat
[downloads-url]: https://npmjs.org/package/raml-javascript-generator
[travis-image]: https://img.shields.io/travis/mulesoft-labs/raml-javascript-generator.svg?style=flat
[travis-url]: https://travis-ci.org/mulesoft-labs/raml-javascript-generator
[coveralls-image]: https://img.shields.io/coveralls/mulesoft-labs/raml-javascript-generator.svg?style=flat
[coveralls-url]: https://coveralls.io/r/mulesoft-labs/raml-javascript-generator?branch=master