1- # outdoc
1+ <img width =" 40% " height =" 40% " src =" https://user-images.githubusercontent.com/5305874/189351845-477cc7e1-cd6e-40c2-ae44-9bd169a41595.png " />
2+
23[ ![ Version] ( http://img.shields.io/npm/v/outdoc.svg )] ( https://www.npmjs.org/package/outdoc )
34[ ![ npm download] [ download-image ]] [ download-url ]
45
56[ download-image ] : https://img.shields.io/npm/dm/outdoc.svg?style=flat-square
67[ download-url ] : https://npmjs.org/package/outdoc
78
8- Auto generate OpenAPI document from local testing
9-
10- The project still need more tests to cover more use cases
11-
12- Please try it in your project and let us know if you got any issues or suggestions
9+ Auto generate OpenAPI document from local HTTP testing
1310
1411## Installation
1512
1613``` bash
1714$ npm install outdoc -D
1815```
1916
20- ## Configuration
21- Check if the field ` main ` in your package.json pointing to the file where the node server exported.
22-
23- If not, add ` output.main ` pointing to the file, e.g.:
17+ ## Usage
2418
19+ Add the following codes into your main file
2520```
26- {
27- ...
28- "outdoc": {
29- "main": "./server/index.js"
30- }
31- }
3221```
3322
34- ## Usage
35-
3623``` bash
3724$ npx outdoc [test command] [options]
3825```
@@ -42,7 +29,8 @@ Usually it could be:
4229``` bash
4330$ npx outdoc npm test -t project-name
4431```
45- And it will generate an api.yaml in your root folder by default
32+
33+ Finally it will generate an api.yaml in your root folder by default
4634
4735## Options
4836
@@ -51,10 +39,29 @@ And it will generate an api.yaml in your root folder by default
5139 -t, --title <string> title of the api document, default: API Document
5240 -v, --version <string> version of the api document, default: 1.0.0
5341 -e, --email <string> contact information
42+ -f, --force run the script without adding OutDoc.init in the code
5443 -h, --help display help for command
5544```
5645
5746
47+
48+
49+
50+ ## Configuration
51+ Check if the field ` main ` in your package.json pointing to the file where the node server exported.
52+
53+ If not, add ` output.main ` pointing to the file, e.g.:
54+
55+ ```
56+ {
57+ ...
58+ "outdoc": {
59+ "main": "./server/index.js"
60+ }
61+ }
62+ ```
63+
64+
5865## Typescript projects
5966Add ` output.main ` in your package.json pointing to the file where the nodejs server exported, e.g.:
6067
0 commit comments