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

OpenAPI or Postman #73

Open
rodericj opened this issue Mar 23, 2020 · 10 comments
Open

OpenAPI or Postman #73

rodericj opened this issue Mar 23, 2020 · 10 comments

Comments

@rodericj
Copy link

Have you ever considered providing an OpenAPI/Swagger/Postman implementation for this? If I get some time I'd consider creating a PR for it.

@crobertsbmw
Copy link
Owner

crobertsbmw commented Mar 23, 2020 via email

@rodericj
Copy link
Author

An OpenAPI implementation there are tools available that will actually generate clients in any language. This helps in my specific case as creating the client can be quite cumbersome.

@crobertsbmw
Copy link
Owner

crobertsbmw commented Mar 23, 2020 via email

@rodericj
Copy link
Author

rodericj commented Mar 23, 2020

I've started a draft here: https://app.swaggerhub.com/apis/Thumbworks/DeckOfCards/1.0.0. This'll allow you to export some large number of clients, including swift, which I'm interested in. The idea with my PR would be that I'd add the specific yaml file to a documents folder somewhere. Happy to collaborate if this is something you'd want quicker.

As for keeping it backwards compatible, these yaml files have version numbers on them.

@crobertsbmw
Copy link
Owner

crobertsbmw commented Mar 23, 2020 via email

@rodericj
Copy link
Author

rodericj commented Mar 23, 2020

I mean it depends how deep you want to go with this. One scenario is that you drop the yaml file in a docs directory like this: https://github.com/jamescmartinez/coffee/tree/master/docs. Next level after this would be to build files like urls.py and view.py using the yaml in the docs folder.

With just dropping the file into the docs directory, you'd need to now keep 2 things up to date.

I'm happy to hop on a call if you want, I'm not expert in this and you probably have a ton more context than I've got.

@rodericj
Copy link
Author

I went ahead and auto generated some of a client library that I'd be interested in using: https://github.com/ThumbWorks/DeckOfCards. This then opens up opportunities to use swift package manager which I was interested in using.

@crobertsbmw
Copy link
Owner

crobertsbmw commented Mar 26, 2020 via email

@rodericj
Copy link
Author

I'd spoken to a colleague about this and it became abundantly clear that I needed to add some usage in the README, so take a look at that to see what this gives you.

In working on this I'd come up with some feedback items on the design of this API. I'd like to propose these in a new PR and/or issue if you're up for it.

@crobertsbmw
Copy link
Owner

crobertsbmw commented Mar 26, 2020 via email

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