docker.rs icon indicating copy to clipboard operation
docker.rs copied to clipboard

Use auto generation for generating the api

Open farodin91 opened this issue 7 years ago • 7 comments

Cool Project, I'm currently trying the same stuff. I try to use swagger codegen for generating the docker api.

I would like to help on this topic.

I found another project which uses go to generated the a docker api: https://github.com/Microsoft/Docker.DotNet/tree/master/tools/specgen

farodin91 avatar Jun 22 '18 08:06 farodin91

This would be great, can you send a pull request regarding the same. :)

fristonio avatar Jun 22 '18 14:06 fristonio

I'm working on it. The generated models have arround 400 errors. Mostly three or four types of errors.

farodin91 avatar Jun 27 '18 21:06 farodin91

Great, Looking forward to the Pull Request. In the meantime, I am working on images endpoints for docker. I need them in one of my projects :P

fristonio avatar Jun 28 '18 05:06 fristonio

FYI, Microsoft announced their use of Rust in their Iotedge project, and it turns out that they have a generated docker-rs crate there: https://github.com/Azure/iotedge/tree/master/edgelet/docker-rs and there are some details about its state: https://github.com/Azure/iotedge/commit/a432894e2d1eb3627e416730de88f5aa643433e6

frol avatar Jun 28 '18 07:06 frol

@frol though it does look good, I don't think they published it as a crate. Also, there is literally no documentation whatsoever. I think they were facing the same problem, no stable and mature library for docker interaction so they decided to develop their own. There are stable docker wrappers in other language like python but all the crates rust have are not complete and lacks some important features.

fristonio avatar Jun 29 '18 10:06 fristonio

I don't think they published it as a crate.

You are right, they didn't, but: https://github.com/Azure/iotedge/issues/1

so they decided to develop their own.

The only minor detail here I want to add is that they didn't develop it from scratch, they used Swagger-Codegen (with some patches mentioned in the referenced commit message) to generate the crate.

frol avatar Jun 29 '18 12:06 frol

It would be cool if microsoft would move this crate into a own repo.

farodin91 avatar Jul 02 '18 11:07 farodin91