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

Michael Vorburger edited comment on FINERACT-835 at 1/23/20 6:10 PM:
---------------------------------------------------------------------

{quote}swagger spec file generated is an OpenAPI 3 spec file and not swagger 2 
spec file{quote}

I've just had a quick look, and noticed 
[https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin]
 does not seem to have any option to change that. So if we use this plugin, 
which does seem to be the "official" and thus "right" one, then I guess this 
logically then simply means that would have to adapt to that?

{quote}plugin does not scan through some annotations as we are currently using 
swagger-core 1.5.x annotations. The plugin generates openAPI 3 with 
swagger-core 2.x annotations{quote}

... what would it take for you to (bulk, search and replace?) change the 
annotation we are currently using from swagger-core 1.5.x to swagger-core 2.x?  
This is an honest open question - I don't know enough about Swagger to 
determine if this is fairly trivial or totally impossible. Speaking totally in 
general, using the latest version of open source libraries is generally always 
a good idea, because, sooner or later, something or the other won't work with 
the old version anymore.


was (Author: vorburger):
{quote}swagger spec file generated is an OpenAPI 3 spec file and not swagger 2 
spec file\{quote}

I've just had a quick look, and noticed 
[https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin]
 does not seem to have any option to change that. So if we use this plugin, 
which does seem to be the "official" and thus "right" one, then I guess this 
logically then simply means that would have to adapt to that?

{quote}plugin does not scan through some annotations as we are currently using 
swagger-core 1.5.x annotations. The plugin generates openAPI 3 with 
swagger-core 2.x annotations\{quote}

... what would it take for you to (bulk, search and replace?) change the 
annotation we are currently using from swagger-core 1.5.x to swagger-core 2.x?  
This is an honest open question - I don't know enough about Swagger to 
determine if this is fairly trivial or totally impossible. Speaking totally in 
general, using the latest version of open source libraries is generally always 
a good idea, because, sooner or later, something or the other won't work with 
the old version anymore.

> 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
>            Priority: Major
>
> 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)

Reply via email to