theLaborInVain / kdm-manager-api

The API used by https://kdm-manager.com and related Kingdom Death: Monster utilities.
Other
3 stars 0 forks source link

Add a Open API 3.0 Spec #57

Open kalinon opened 2 years ago

kalinon commented 2 years ago

It would be awesome if the API had a OpenAPI Spec. This would allow others to auto-generate clients and other tools that can easily integrate into your API.

Awesome API either way. Thanks for it!

toconnell commented 2 years ago

Hey @kalinon !

Honestly, this is the first time I've heard of this, but I just read the doc and I really like it!

Mostly I like how it addresses a ton of the questions about where/how to do meta-type data (e.g. data ABOUT the API and how to navigate it, etc.) right up front. Over time, I've just sort of been...making those up, so this is a really nice-looking framework.

Anyway, I'll look at this for the 2022 roadmap.

Thanks again!

kalinon commented 2 years ago

@toconnell yes it is! it also can auto generate your site documentation. Not to mention both server and client side code based on your spec. Here are some more resources:

https://editor.swagger.io/ https://openapi-generator.tech/

I'm not a huge python guy, so i dont know what tools are out there, but perhaps there's a flask/openapi lib that can help you auto generate it. A quick google got me these:

https://flask-rest-api.readthedocs.io/en/stable/openapi.html https://luolingchun.github.io/flask-openapi3/ - This one looks awesome