mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
Fix incorrect npx command (#6537)
The current `npx ` command says to use: ``` npx openapi-generator generate -i petstore.yaml -g ruby -o /tmp/test/ ``` This however, pulls a similarly-named but different project: [zhang740/openapi-generator](https://www.npmjs.com/package/openapi-generator). This commit fixes this, by using the appropriate package `@openapitools/openapi-generator-cli`
This commit is contained in:
committed by
GitHub
parent
859e7f7228
commit
83a0f7d65b
@@ -33,7 +33,7 @@ npm install @openapitools/openapi-generator-cli -D
|
||||
Then, **generate** a ruby client from a valid [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) doc:
|
||||
|
||||
```bash
|
||||
npx openapi-generator generate -i petstore.yaml -g ruby -o /tmp/test/
|
||||
npx @openapitools/openapi-generator-cli generate -i petstore.yaml -g ruby -o /tmp/test/
|
||||
```
|
||||
|
||||
> `npx` will execute a globally available `openapi-generator`, and if not found it will fall back to project-local commands. The result is that the above command will work regardless of which installation method you've chosen.
|
||||
|
||||
Reference in New Issue
Block a user