elixir-cloud-aai / ga4gh-sdk

Generic SDK and CLI for GA4GH API services
Apache License 2.0
3 stars 0 forks source link

Try auto code generation for TES specification #12

Open uniqueg opened 1 month ago

uniqueg commented 1 month ago
aaravm commented 1 month ago

I have checked out the openAPI tooling, and Rust library can be made using https://openapi-generator.tech/docs/generators/rust/
I tried this on TES API version 1.1 and I generated https://github.com/aaravm/tes-library-rust-autogenerated

aaravm commented 1 month ago

I also tried for wes specification: https://github.com/aaravm/wes_openapi

uniqueg commented 1 month ago

Good stuff. As far as I can tell, this looks pretty decent. Maybe the comments could use some work (wrap/multi lines?). Apart from that, I guess we will have to see if we run into problems with the generated models. I think that in another (Python) project the auto-generated models for TES needed to lightly amended. I will see if I find more info on that.

I suggest that you create a PR to merge the models, docs and whatever else seems necessary (for now only for TES) into the main project and ask @vemonet and @pavelnikonorov for reviews.

uniqueg commented 1 month ago

Here are the auto-generated TES 1.0.0 Pydantic models. And I think here are the manual changes (I guess you can ignore the TESK-specific changes, but for the others, please have a look and see if they are indeed required by the specs but not picked up by the auto-generated models).