Dyalog / Jarvis

APL-based web service framework supporting JSON or REST
https://dyalog.github.io/Jarvis/
MIT License
33 stars 6 forks source link

Add support for Swagger UI #54

Open GheorgheBalan89 opened 8 months ago

GheorgheBalan89 commented 8 months ago

Swagger UI is a free library used for API documentation. The use of it is so wide spread it can be considered industry standard. In C# the library is available as a nuget package that can be installed and configured for each individual project. https://learn.microsoft.com/en-us/aspnet/core/tutorials/web-api-help-pages-using-swagger?view=aspnetcore-7.0 It would be nice if this was available in Jarvis as well, preferably by default.

rikedyp commented 8 months ago

Hi Gheorghe,

We'd like to better understand what you envision with Jarvis and SwaggerUI. From what we can tell, it seems the steps are: • Define an API using OpenAPI in a json or yaml file. • Make it viewable using SwaggerUI as a set of HTML/CSS/JavaScript files. • Enable Jarvis to serve that content up through its HTML interface. It would still be up to the developer to write all the code in Jarvis to actually service the requests.

Is that along the lines of what you were envisioning? Or did you have something else in mind?

If that's what you had envisioned, then I think we just need to enable the HTML interface in REST mode. In fact, it wouldn't matter whether the content was generated by SwaggerUI or any other tool as Jarvis doesn't need any special knowledge of the source of the HTML/CSS/JS.

GheorgheBalan89 commented 7 months ago

I think that would definitely be a possible solution. The outcome would be to use the SwaggerUI interface as a test tool while developing an APL based webservice in Jarvis.