Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create OpenAPI spec for client generation #584

Open
charlie-harvey opened this issue Mar 28, 2018 · 2 comments
Open

Create OpenAPI spec for client generation #584

charlie-harvey opened this issue Mar 28, 2018 · 2 comments

Comments

@charlie-harvey
Copy link

There are currently 3 clients for Collins - you have to roll your own even for Java.

If there was an OpenAPI document somewhere it could be used to generate clients in at least a dozen languages. Swagger Codegen being the example that would be most obvious.

@defect
Copy link
Contributor

defect commented May 4, 2018

Hi, sorry for the super slow response.

Currently the Go and ruby clients cover 99% of our use cases at Tumblr (that last % being straight curl calls) so we haven't looked in to codegen things much. Not saying that we shouldn't, but time is limited :)

OpenAPI does looks pretty cool though. Do you think it would fit the collins API well, which can be kinda unorthodox here and there.

@charlie-harvey
Copy link
Author

There are definitely unorthodox bits to the Collins API. The uninitiated might even call them frustrating. :) I recently wrote a java client that mimics the Asset and AssetType part of the Go Client. Don't need the rest as of now so I'll get to that later.

Apparently you can use the Swagger Editor and just write out your contract in YAML. They are trying to make it like Thrift/Protobuf. Write out your contract ahead of time and then generate the Server Stubs and Clients. It does work. But the process of writing out the contract is probably pretty time consuming.

But just think, then you can finally have that Ada client. And Eiffel. And Lua. Its all about Lua now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants