You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Michael Vorburger (Jira)" <ji...@apache.org> on 2020/06/20 11:20:00 UTC

[jira] [Commented] (FINERACT-835) Generate swagger-ui/response.json at build time

    [ https://issues.apache.org/jira/browse/FINERACT-835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17141045#comment-17141045 ] 

Michael Vorburger commented on FINERACT-835:
--------------------------------------------

[~ptuomola] is making progress towards this in https://github.com/apache/fineract/pull/1069/ - yay! I've just tried our the PR locally before merging it - this rocks, great (re-)start on this front! 

As the description of that PR explains, we currently still have 2 Swagger JSON, and old and a new one - and FINERACT-837 coming next will clean that up later. Right now, the two Swagger JSON are still significantly different, note how the old manually maintained in Git http://localhost:8080/fineract-provider/swagger-ui/response.json is significantly bigger than the new one auto generated at build time on http://localhost:8080/fineract-provider/swagger-ui/fineract.json ... notably, all Descriptions are currently still missing. [~Manthan] would you perhaps like to dig further into that that? Or [~ptuomola] do you already know what needs to be done here next? BTW I'm happy to help play the "tester" on this feature, and help to "diff" the old and new one, if you like? Or if you can do that yourself and document diffs here in this issue or future PRs, then even better! ;)

[~ptuomola] BTW I'm not super clear on this entire v2 (NB swagger: 2.0 in the old  -VS- swagger: 3.0.1 in the new one, but given that it seems to work somehow, I guess we're done here re. that aspect? Then what was all that back and forth (above) above - how did all that confusion magically just get resolved meanwhile? Or... is the fact that it's so much smaller and descriptions are missing related to that discussion?

[~kangbreder] I don't know if you are still interested in this, and have any interest in collaborating with [~ptuomola] and [~Manthan]? You guys could perhaps split up the sub-tasks under the parent of this issue somehow among yourselves. Or one of you can just get it all done - that sure work as well! :P

> Generate swagger-ui/response.json at build time
> -----------------------------------------------
>
>                 Key: FINERACT-835
>                 URL: https://issues.apache.org/jira/browse/FINERACT-835
>             Project: Apache Fineract
>          Issue Type: Sub-task
>            Reporter: Michael Vorburger
>            Assignee: Petri Tuomola
>            Priority: Major
>              Labels: beginner, documentation
>             Fix For: 1.4.0
>
>
> We currently have src/main/resources/swagger-ui/response.json (checked into Git).
> That file seems to have been manually put there by people over time. https://github.com/apache/fineract/pull/629 (which got superseded by https://github.com/apache/fineract/pull/695) mentions that, quote:
> {quote}The already existing response.json file in src/main/resources/swagger-ui/ is the spec generated with the request https://localhost:8443/fineract-provider/api/v1/swagger.json. Every time a modification is done on the swagger docs or a new swagger doc is added, this spec needs to be generated again at runtime and the response.json file as well updated so that the modifications can be seen on the UI.{quote}
> and also:
> {quote}The io.swagger.core.v3.swagger-gradle-plugin is a plugin i had added to automatically generate the specs during build time and not at run time. This was so that every time one builds on the project, the response.json updates. But this did not work as expected.{quote}
> The review process of the PR raise for this issue will be as follows: We will modify one of the descriptions in one of those annotations added in the original PR. We will (manually, locally) run {{./gradlew build}}. If that updates the src/main/resources/swagger-ui/response.json, then this task is done, and the proposed PR will be merged. 
> [~kangbreder] would you like to do this? Please raise PR with ONLY this change, nothing else. Specifically, please do NOT add other Gradle plugins to the build which are not directly related to this specific goal. For example, building client libraries, or moving that response.json file elsewhere, is out of scope of this sub-task. (I'll be creating another sub-task about those things.)
> [~awasum] [~sanyam] ([~sanyam96] ?) FYI



--
This message was sent by Atlassian Jira
(v8.3.4#803005)