AlanOC91 / YGOPRODeck

Yu-Gi-Oh! Card Database and Deck Share Site
81 stars 4 forks source link

Proposal: OpenAPI description (first draft implemented) #448

Open magicDGS opened 1 year ago

magicDGS commented 1 year ago

Hello. I am about to start a project using this API as a template to collect the data and I started generating an OpenAPI definition grabbing all possible information from https://ygoprodeck.com/api-guide/ and some inspection on the developer tools to understand things underdocumented on the website.

My idea was to describe the API to be able to use that file to generate some SDK for different projects as need it, not only mine. In my case, I am planning to provide a generated Java Client SDK and a wrapper around it to persist the data locally to avoid calls to your API, that will be also open source.

I am communicating this to you to have some feedback about the following:

Just for your information, the first draft is an OpenAPI description that is split and join with redoc and those are the current ways to visualize it:

In the near future I will create a GitHub workflow to release automatically on PR merge, so there is always a latest version to be consumed. Maybe I will also host some static description on github-pages as it would be useful for my own purposes.

Please, let me know in this issue if you are interested on something about this. Otherwise, feel free to close the ticket.

magicDGS commented 1 year ago

Hello @AlanOC91 - just to bring out this to your radar again. The https://github.com/magicDGS-gaming/ygoprodeck-openapi repository that I have created to simplify my process of testing your API for changes in the models and generate some client libraries (coming soon) has evolve quite a while and I would like to know if you have any problem with it being there. At the moment, the following is happening on the repository that might incur into some load to your API:

Is it fine for you this?

The nice thing about this automation is that a bundle OpenAPI description and postman collection is uploaded on each "pre-release" (only triggered on tagging) which can be usable as-is on other projects. For example, check https://github.com/magicDGS-gaming/ygoprodeck-openapi/releases/tag/v0.9.0 (containing the YAML API and the postman collection as json on the assets). Also, the following github-pages site https://magicdgs-gaming.github.io/ygoprodeck-openapi/index.html contains the documentation that is nicely rendered by using redoc with the OpenAPI description.

Last but not list, I assigned an unlicensed license to the project as I don't want to keep any of this work for me but for the community using the API that you are also providing to us.

If you want to collaborate to keep this project in real sync with your API, or even take it over to provide it to the public on a consumable way to be used on code-generation tools and postman to try out, do not hesitate to contact me. I am not in the search of anything but doing some open source projects based on yugioh as a personal thing, and I have a couple of ideas that can be great by consuming your API.

AlanOC91 commented 1 year ago

Hey! Sorry for the extremely delayed response on this.

Could you shoot me an email over at admin@ygoprodeck.com?