podman-api-rs icon indicating copy to clipboard operation
podman-api-rs copied to clipboard

Podman API 5.0.0 support

Open dvzrv opened this issue 10 months ago • 4 comments

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.

  • Crate version: 0.10.0
  • OS: Arch Linux
  • Output of running podman version on the command line:
Client:       Podman Engine
Version:      5.0.0
API Version:  5.0.0
Go Version:   go1.22.1
Git Commit:   e71ec6f1d94d2d97fb3afe08aae0d8adaf8bddf0-dirty
Built:        Thu Mar 21 23:30:17 2024
OS/Arch:      linux/amd64

dvzrv avatar Mar 31 '24 21:03 dvzrv

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.

dvzrv avatar Apr 01 '24 11:04 dvzrv

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?

wez avatar Apr 22 '24 17:04 wez

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.

janst97 avatar May 21 '24 11:05 janst97

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

dvzrv avatar May 22 '24 16:05 dvzrv