-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Raisel Melian
committed
Jan 24, 2019
1 parent
c123c10
commit 4ca3298
Showing
4 changed files
with
79 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<h1 align="center">AsyncAPI linter</h1> | ||
<p align="center"> | ||
<em>Validate your AsyncAPI specifications</em> | ||
</p> | ||
<br><br> | ||
|
||
## Install | ||
|
||
```bash | ||
npm install -g asyncapi-linter | ||
``` | ||
|
||
## Usage | ||
|
||
```bash | ||
Usage: asyncapi-linter <command> | ||
|
||
Options: | ||
|
||
-V, --version output the version number | ||
-h, --help output usage information | ||
|
||
Commands: | ||
validate <file-or-url> validate AsyncAPI file/url. If valid, exit code is 0, otherwise exit code is 1 | ||
convert <file-or-url> convert AsyncAPI file/url from YAML to JSON and vice-versa. No compression is performed | ||
``` | ||
|
||
### Validate Command | ||
```bash | ||
Usage: asyncapi-linter validate | ||
``` | ||
|
||
#### Examples | ||
|
||
validate a yaml specification | ||
```bash | ||
asyncapi-linter validate asyncapi.yaml | ||
``` | ||
|
||
validate a json specification | ||
```bash | ||
asyncapi-linter validate asyncapi.json | ||
``` | ||
|
||
### Convert Command | ||
```bash | ||
Usage: asyncapi-linter convert | ||
|
||
Options: | ||
|
||
-f, --format specify desired target format: json|yaml | ||
-h, --help output usage information | ||
|
||
``` | ||
|
||
#### Examples | ||
|
||
convert to yaml | ||
```bash | ||
asyncapi-linter convert -f json asyncapi.json | ||
``` | ||
|
||
convert to json | ||
```bash | ||
asyncapi-linter convert -f yaml asyncapi.json | ||
``` | ||
|
||
|
||
## Requirements | ||
|
||
* Node.js v7.6+ | ||
|
||
## Author | ||
|
||
Raisel Melian ([@raiselmelian](http://twitter.com/raiselmelian)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
asyncapid: '1.2.0' | ||
asyncapi: '1.2.0' | ||
info: | ||
title: Streetlights API | ||
version: '1.0.0' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters