digicademy / svsal

The School of Salamanca. Web Application
MIT License
16 stars 7 forks source link

Make OpenAPI docs from RestXQ annotations #82

Open dvglc opened 4 years ago

dvglc commented 4 years ago

For instance, using https://lab.sub.uni-goettingen.de/openapi4restxq.html (I haven't managed to get this to work reasonably fast, though...). There might be other tools available as well.

Once available, the API default handler could redirect to the OpenAPI docs in case of an underspecified request (instead of throwing an 400 error, as is the case ATM).

dvglc commented 4 years ago

Perhaps the easiest way for generating OpenAPI docs would be a self-written program for transforming the output of a restxq registry function (such as exrest:register-module()) into an OpenAPI-json format. See the output of $config:app-root/register-rest.xql, for example.