Skip to content

Commit 2d24f06

Browse files
authored
#6 Includes license badge in readme files & creates CONTRIBUTIONS.md
2 parents a7af1b8 + e6b81be commit 2d24f06

File tree

3 files changed

+88
-22
lines changed

3 files changed

+88
-22
lines changed

CONTRIBUTING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://github.com/corunet/openapi-nodejs-cli/blob/main/LICENSE)
2+
3+
# OpenAPI NodeJS CLI
4+
5+
This generator requires the Node version >=17.7.1 to run properly
6+
7+
## Install dependencies
8+
9+
To install dependencies run:
10+
`npm i`
11+
12+
## Build
13+
14+
Build the project with `npm run build`
15+
16+
## Usage
17+
18+
To view usage of the cli run:
19+
20+
`npm start -- -h`
21+
22+
### Options
23+
24+
- `-i <string...>`: list of URLs and/or directories to the list of OpenAPI specification used to generate the code
25+
- `--allowed-paths <string..>`: list of paths allowed to be used to generate the code
26+
- `--client`: generate client code only
27+
- `--server`: generate server code only
28+
29+
If `--client` and `--server` are not set, both client and server code will be generated.
30+
31+
## 🧰 Support
32+
33+
We’ll be glad to talk and discuss how `openapi-nodejs-cli` can help you 😊
34+
35+
Reach us through [GitHub issues](https://github.com/corunet/openapi-nodejs-cli/issues), [email](mailto:[email protected]) or [Twitter](https://twitter.com/corunet).
36+
37+
38+
### Examples
39+
40+
- Generate code from 2 OpenAPI specification files (URLs)
41+
42+
`npm start -- -i http://127.0.0.1:8080/kafka.yaml http://127.0.0.1:8080/schemaRegistry.yaml`
43+
44+
- Only generate client code from 1 file form a directory using only the given path
45+
46+
`npm start -- -i /Users/user/specification/kafka.yaml --allowed-paths /kafka --client`

README.md

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,53 @@
1-
# OpenAPI NodeJS CLI
1+
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://github.com/corunet/openapi-nodejs-cli/blob/main/LICENSE)
22

3-
This generator requires the Node version >=17.7.1 to run properly
3+
[Summary](#summary) · [Getting started](#getting-started) · [Support](#support) · [License](#license)
44

5-
## Install dependencies
5+
## 📜 Summary
6+
`openapi-nodejs-cli` is a typescript code generator from an OpenApi document.
67

7-
To install dependencies run:
8-
`npm i`
8+
`openapi-nodejs-cli` can generate nodejs, typescript client and Angular client methods from an OpenApi document.
99

10-
## Build
1110

12-
Build the project with `npm run build`
11+
## 🚀 Getting Started
1312

14-
## Usage
13+
### How to install
1514

16-
To view usage of the cli run:
15+
```bash
16+
npm i @corunet/openapi-nodejs-cli --global
17+
```
1718

18-
`npm start -- -h`
19+
### 🧑🏻‍💻 Usage
1920

20-
### Options
21+
```bash
22+
openapi-nodejs-cli input/schema.yaml
23+
```
2124

22-
- `-i <string...>`: list of URLs and/or directories to the list of OpenAPI specification used to generate the code
23-
- `--allowed-paths <string..>`: list of paths allowed to be used to generate the code
24-
- `--client`: generate client code only
25-
- `--server`: generate server code only
25+
You can retrieve an option list with this command:
26+
```
27+
openapi-nodejs-cli --help
28+
```
2629

27-
If `--client` and `--server` are not set, both client and server code will be generated.
30+
```
31+
Usage: openapi-nodejs-cli [options]
2832
29-
### Examples
33+
Options:
34+
-V, --version output the version number
35+
-i, --input <string...> OpenAPI spec URLs or directories
36+
-o, --output <string...> Output folder
37+
--client only generate client code
38+
--server only generate server code
39+
--angular generate client code for Angular
40+
-h, --help display help for command
41+
```
42+
## 🧰 Support
3043

31-
- Generate code from 2 OpenAPI specification files (URLs)
44+
We’ll be glad to talk and discuss how `openapi-nodejs-cli` can help you 😊
3245

33-
`npm start -- -i http://127.0.0.1:8080/kafka.yaml http://127.0.0.1:8080/schemaRegistry.yaml`
46+
Reach us through [GitHub issues](https://github.com/corunet/openapi-nodejs-cli/issues), [email](mailto:[email protected]) or [Twitter](https://twitter.com/corunet).
3447

35-
- Only generate client code from 1 file form a directory using only the given path
48+
## License
3649

37-
`npm start -- -i /Users/user/specification/kafka.yaml --allowed-paths /kafka --client`
50+
51+
52+
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at [https://mozilla.org/MPL/2.0/](https://mozilla.org/MPL/2.0/).
53+
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://github.com/corunet/openapi-nodejs-cli/blob/main/LICENSE)

src/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://github.com/corunet/openapi-nodejs-cli/blob/main/LICENSE)
2+
13
[Summary](#summary) · [Getting started](#getting-started) · [Support](#support) · [License](#license)
24

35
## 📜 Summary
@@ -45,5 +47,7 @@ Reach us through [GitHub issues](https://github.com/corunet/openapi-nodejs-cli/i
4547

4648
## License
4749

50+
51+
4852
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at [https://mozilla.org/MPL/2.0/](https://mozilla.org/MPL/2.0/).
49-
53+
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://github.com/corunet/openapi-nodejs-cli/blob/main/LICENSE)

0 commit comments

Comments
 (0)