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

Autogeneration from openapi #59

Open
dylanmcreynolds opened this issue Jul 3, 2024 · 0 comments
Open

Autogeneration from openapi #59

dylanmcreynolds opened this issue Jul 3, 2024 · 0 comments
Assignees

Comments

@dylanmcreynolds
Copy link
Collaborator

We have discussed over the years whether to autogenerate the pyscisat client from the openapi.json. We feel this is a great time to try it. We tried this long ago using the older backend, and the loopback-generated openapi created some pretty ugly auto-generated code. But with the new backend, there has been a lot of work on making a better openapi, and things are better.

Known advantages:

  • Comments in the nest.js seem to make it up to the openapi and into docstrings for the generated client. Cool
  • openapi-python-client builds both a sync and async client. This is really great for implementations where pyscicat was used within a web service (like, say, fastapi)
  • less work overall

Some issues with this approach:

  • Where does one go to find the "official" openapi json? It would be nice to be able to release builds that track the current version of the backend buout I'm not sure how that works. Would github action download the backend and npm and issue a build command that outputs a the openapi.json file?
  • This will significantly change the API for pyscicat. I propose that we release this as v1.0.0 an declare that it is a breaking change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants