yakworks / gorm-rest-api

Grails restful api helpers to make gorm domains rest api enabled
https://yakworks.github.io/gorm-rest-api/
Apache License 2.0
1 stars 2 forks source link

Swagger OpenApi #5

Open basejump opened 7 years ago

basejump commented 7 years ago

This depends on #1 being done first.

Options are

Swaggydoc

They are looking for a new maintainer. https://github.com/rahulsom/swaggydoc We can take it over, sunset the grails2 code and clean it up, upgrade to Swagger 2.0, merge my stuff in SchemaService in. I also ran a quick test and it the swaggydocs examples seem to run well. See the SwaggyDataService for how it handles associations

springfox

have not tried this yet. One of you should guys should look into it and see if you can get example working and checked in so we can see it. https://github.com/springfox/springfox-grails-demo Would need to figure out how to extend so we can merge in more domain details like I was doing in SchemaService. its not as obvious to me how to do it as it is in swaggyDoc. Springfox seems to have some momentum. might be worth reaching out and colabborating with the author to see if we can jump in and help make it better with what we are trying to do (which should really be another issue to spec out)

http://springfox.github.io/springfox/docs/current/ there seems to be a version for Grails too, https://github.com/springfox/springfox-grails-integration

Like the json-schema these will be generated for every restApiController ideally after compile and put in the resources package. Will need to look into if we do these once per pacage or do we generated 1 ibg ass file for the entire app and all controllers.

snimavat commented 7 years ago

@basejump I have looked at swaggydoc and Springfox and tried both.

Swaggydoc. It is based on swagger 1.2 Spec. Some what dirty implementation.. works, but broken at many things. We will need to get it working properly and maintain the project ourself. I think we can come up with better even if we did it from scratch. (We already have schema object generator)

Springfox

As per my current understanding of Springfox, we will probably need to do following.

Could be few things more.

Which one do you suggest to use .. When can you be available to discuss further?