api-preview-docs icon indicating copy to clipboard operation
api-preview-docs copied to clipboard

[Feature Request] Use codegen to create client libraries

Open coilysiren opened this issue 6 years ago • 1 comments
trafficstars

Requested Feature

I would very much appreciate CircleCI generating some client libraries from its api spec. I'm imagining something like swagger-codegen or protobuf, or however it's implemented in the various clients aws provides (example).

Context

I've built / maintained several small services that use the CircleCI api. Generally when I'm building services like this (in python / golang / javascript) I want to use a client, since working directly with json can often be annoying. In many cases, I have opted to use client libraries provided by 3rd parties, such as

  • https://github.com/jszwedko/go-circleci
  • https://github.com/levlaz/circleci.py

I prefer 3rd party client libraries over using the json api directly, but I'm still not totally comfortable with using 3rd party libraries to access an API for a vendor.

Impact

If there were some automatically generated libraries available for this API, it would have the following effects:

  • it would be more stable than using a json api directly, which would increase the reliability of the services I build on top of CircleCI
  • it would be more trustworthy than using client libraries, which eliminates the cognitive / operational overhead that is currently incurred via us using client libraries from random open source contributors

Closing

I would very much like this feature, so please let me know when you add it ✨ 🙏 thank you for reading! 🙏 ✨

coilysiren avatar Aug 03 '19 19:08 coilysiren

Now that we're using an openapi spec, we've been experimenting with this very notion starting with a Java client https://github.com/CircleCI-Public/java-api-client/

jama22 avatar Oct 30 '19 19:10 jama22