You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.[Using the converter as a NodeJS module](#using-the-converter-as-a-nodejs-module)
17
+
2.[Command Line Interface](#command-line-interface)
18
+
1.[Options](#options)
19
+
2.[Usage](#usage)
20
+
3.[Using the converter as a NodeJS module](#using-the-converter-as-a-nodejs-module)
18
21
1.[Convert Function](#convert)
19
22
2.[Options](#options)
20
23
3.[ConversionResult](#conversionresult)
21
24
4.[Sample usage](#sample-usage)
22
25
5.[Validate function](#validate-function)
23
-
3.[Command Line Interface](#command-line-interface)
24
-
1.[Options](#options)
25
-
2.[Usage](#usage)
26
26
4.[Conversion Schema](#conversion-schema)
27
27
28
28
---
29
29
30
-
## Getting Started
30
+
---
31
+
32
+
### 🚀 We now also support OpenAPI 3.1 and Swagger 2.0 along with OpenAPI 3.0.
33
+
---
34
+
---
35
+
36
+
## 💭 Getting Started
31
37
32
38
To use the converter as a Node module, you need to have a copy of the NodeJS runtime. The easiest way to do this is through npm. If you have NodeJS installed you have npm installed as well.
33
39
@@ -41,7 +47,64 @@ If you want to use the converter in the CLI, install it globally with NPM:
41
47
$ npm i -g openapi-to-postmanv2
42
48
```
43
49
44
-
## Using the converter as a NodeJS module
50
+
51
+
## 📖 Command Line Interface
52
+
53
+
The converter can be used as a CLI tool as well. The following [command line options](#options) are available.
54
+
55
+
`openapi2postmanv2 [options]`
56
+
57
+
### Options
58
+
59
+
-`-s <source>`, `--spec <source>`
60
+
Used to specify the OpenAPI specification (file path) which is to be converted
61
+
62
+
-`-o <destination>`, `--output <destination>`
63
+
Used to specify the destination file in which the collection is to be written
64
+
65
+
-`-p`, `--pretty`
66
+
Used to pretty print the collection object while writing to a file
67
+
68
+
-`-O`, `--options`
69
+
Used to supply options to the converter, for complete options details see [here](/OPTIONS.md)
70
+
71
+
-`-c`, `--options-config`
72
+
Used to supply options to the converter through config file, for complete options details see [here](/OPTIONS.md)
73
+
74
+
-`-t`, `--test`
75
+
Used to test the collection with an in-built sample specification
76
+
77
+
-`-v`, `--version`
78
+
Specifies the version of the converter
79
+
80
+
-`-h`, `--help`
81
+
Specifies all the options along with a few usage examples on the terminal
82
+
83
+
84
+
### Usage
85
+
86
+
- Takes a specification (spec.yaml) as an input and writes to a file (collection.json) with pretty printing and using provided options
- Takes a specification (spec.yaml) as an input and writes to a file (collection.json) with pretty printing and using provided options (Also avoids any `"<Error: Too many levels of nesting to fake this schema>"` kind of errors present in converted collection)
- Takes a specification (spec.yaml) as an input and writes to a file (collection.json) with pretty printing and using provided options (Also avoids any `"<Error: Too many levels of nesting to fake this schema>"` kind of errors present in converted collection)
0 commit comments