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 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
@@ -25,8 +25,11 @@ const params = commander_1.program
25
25
  .parse(process.argv)
26
26
  .opts();
27
27
  function getPath(path) {
28
- const cwd = process.cwd();
29
- return (0, path_1.join)(cwd, path);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-ts-request",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Swagger2/OpenAPI3 to TypeScript, request client, request mock service, enum, type field label, JSON Schemas",
5
5
  "repository": {
6
6
  "type": "git",