vv9k / podman-api-rs

Rust interface to Podman (libpod).
MIT License
84 stars 12 forks source link

Podman API 5.0.0 support #169

Open dvzrv opened 8 months ago

dvzrv commented 8 months ago

Hi! :wave:

I've started using the podman-api crate and found it to be incredibly useful. Unfortunately it stopped working with podman 5.0.0 and looking at the script to update the generated podman-api-stubs, I noticed that the script is currently not working anymore, as the upstream for the swagger generator is gone: https://github.com/vv9k/podman-api-rs/blob/f35e6f9f9fdb9d9023aed341252c16c0ad9796d1/podman-api-stubs/build.sh#L9

@vv9k would you be able to make that project available again? Maybe it would be more fail proof if this was hosted on github as well.

dvzrv commented 8 months ago

As a quick follow-up and note to anyone potentially interested in this topic:

The crate for generating the stubs in question is also available on github: https://github.com/vv9k/swagger-rustgen The code in that repository seemingly does not work for generating stubs for version 5.0.0 and emits many errors for the current version (4.5.1) as well.

As the author (also of this crate) has not been active for eight months I am not entirely sure how long it will take for things to be upgraded for podman 5 support.

I have therefore also reached out to podman upstream for the possibility to auto-generate a client-side integration based on openapi-generator, which may serve as a more standardized way of integrating with Podman's API in the future.

wez commented 7 months ago

I have therefore also reached out to podman upstream for the possibility to auto-generate a client-side integration based on openapi-generator, which may serve as a more standardized way of integrating with Podman's API in the future.

@dvzrv: is there a link to that discussion or an update on how that's going?

janst97 commented 6 months ago

I opened a PR to address this issue. Test cases succeed and my private projects work with the changes. However, I did not check specifically for API changes/updates to Podman v5, so I suspect that some things might be broken. Feel free to fork or improve the PR.

swagger-rustgen works with swagger definitions for podman 5.0.3, however I can confirm that it was broken for 5.0.0 and 5.0.1.

I'd also be interested in a long term alternative to this project, given its current inactivity.

dvzrv commented 6 months ago

I have therefore also reached out to podman upstream for the possibility to auto-generate a client-side integration based on openapi-generator, which may serve as a more standardized way of integrating with Podman's API in the future.

@dvzrv: is there a link to that discussion or an update on how that's going?

I have reached out to the community via Matrix but was then also asked to send a mail to their mailing list. Have not yet done that, due to -ETOOMANYPROJECTS.

Meanwhile I have moved to rustainers for my test setup :S