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

Make generator easier to call #232

Closed
david-crespo opened this issue Mar 19, 2024 · 1 comment · Fixed by #240
Closed

Make generator easier to call #232

david-crespo opened this issue Mar 19, 2024 · 1 comment · Fixed by #240

Comments

@david-crespo
Copy link
Collaborator

david-crespo commented Mar 19, 2024

The way we call the generator from another repo is embarrassingly bad, which is ok if we're only using it in one repo, but if we want to use this to generate TS clients for other APIs, and we want people to be able to regen their clients easily on API changes, this needs improvement. Ideally you'd be able to do something like

npx @oxide/ts-openapi-gen my-schema.json output-dir/

One possibly easy path to that is through JSR, and this would be a good low-stakes way to experiment. They don't yet support a bin field in the package.json they generate for npm (which is what powers npx), but they have a PR for it that is being actively worked on.

This was referenced Mar 27, 2024
@david-crespo
Copy link
Collaborator Author

On second thought, it sounds like JSR’s npm compatibility mode requires extra setup on the caller side to get npm to use the JSR registry. If that’s right, then this makes no sense as a thing to do. Just use npm directly the normal way.

https://jsr.io/docs/npm-compatibility#advanced-setup

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.

1 participant