Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run when redocly is installed #2010

Open
jaens opened this issue Jan 29, 2024 · 2 comments · Fixed by hey-api/openapi-ts#64
Open

Unable to run when redocly is installed #2010

jaens opened this issue Jan 29, 2024 · 2 comments · Fixed by hey-api/openapi-ts#64
Assignees

Comments

@jaens
Copy link

jaens commented Jan 29, 2024

The popular redocly package installs a bin with the name openapi. (It also links the same binary using the better name redocly).

This package only contains a single ambiguously-named binary openapi, so in case redocly is installed, it's impossible to exec this package, since redocly's binary will shadow it (depending on package manager whims).

Solution: This package should deprecate the openapi binary (can still keep it for backwards compat) and use a more descriptive script name such as openapi-ts-codegen or whatever. (Note that the same script can be linked under multiple different names so this would be a trivial package.json change.)

@loicsimon
Copy link

I upvote this issue as I have the same problem.

For now, I use openapi-typecript-codegen with the following workaround :

node node_modules/openapi-typescript-codegen/bin/index.js --input ./my-specification.json --output ./generated/models/

@mrlubos
Copy link
Collaborator

mrlubos commented Mar 17, 2024

@jaens @loicsimon this is fixed in v0.27.29 🎉

Please use openapi-ts moving forward!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants