openapi-ts-request 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/bin/openapi.js +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,9 +108,11 @@ npm run openapi
|
|
|
108
108
|
```bash
|
|
109
109
|
# npm
|
|
110
110
|
npx --package=openapi-ts-request -- openapi -i ./openapi.json -o ./apis
|
|
111
|
+
npx --package=openapi-ts-request -- openapi -i https://petstore3.swagger.io/api/v3/openapi.json -o ./apis
|
|
111
112
|
|
|
112
113
|
# pnpm
|
|
113
|
-
pnpm --package=openapi-ts-request dlx openapi -i ./openapi.json -o ./apis
|
|
114
|
+
pnpm --package=openapi-ts-request@latest dlx openapi -i ./openapi.json -o ./apis
|
|
115
|
+
pnpm --package=openapi-ts-request@latest dlx openapi -i https://petstore3.swagger.io/api/v3/openapi.json -o ./apis
|
|
114
116
|
```
|
|
115
117
|
|
|
116
118
|
### CLI
|
package/dist/bin/openapi.js
CHANGED
|
@@ -25,8 +25,11 @@ const params = commander_1.program
|
|
|
25
25
|
.parse(process.argv)
|
|
26
26
|
.opts();
|
|
27
27
|
function getPath(path) {
|
|
28
|
-
const
|
|
29
|
-
|
|
28
|
+
const isUrl = path.startsWith('http');
|
|
29
|
+
if (isUrl) {
|
|
30
|
+
return path;
|
|
31
|
+
}
|
|
32
|
+
return (0, path_1.join)(process.cwd(), path);
|
|
30
33
|
}
|
|
31
34
|
function run() {
|
|
32
35
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
package/package.json
CHANGED