vorburger commented on a change in pull request #1418:
URL: https://github.com/apache/fineract/pull/1418#discussion_r506981547



##########
File path: docs/developers/swagger/client.md
##########
@@ -1,46 +1,31 @@
 Generate Apache Fineract API Client
 ============
 
-Apache Fineract supports client code generation using [Swagger 
Codegen](https://github.com/swagger-api/swagger-codegen). Project supports [all 
clients](https://github.com/swagger-api/swagger-codegen#overview) supported by 
Swagger Codegen. It uses [OpenAPI Specification Version 
3.0.3](https://swagger.io/specification/).
+Apache Fineract supports client code generation using [OpenAPI 
Generator](https://openapi-generator.tech). It uses [OpenAPI Specification 
Version 3.0.3](https://swagger.io/specification/).
 
 ## Generate API Client
 
-In root directory of the project:
+The API client is built as part of the overall Fineract Gradle build. If you 
want to save (maybe) some time you can try to execute just the following line 
in root directory of the project:
 
-- Run `./gradlew resolve`
-- Run `./gradlew generateSwaggerCode`
+- Run `./gradlew :fineract-client:build`
 
-The client code will be generated under `build/swagger-code-fineract`
+The client JAR can be found in `build/libs`.

Review comment:
       ```suggestion
   The client JAR can be found in `fineract-client/build/libs`.
   ```

##########
File path: docs/developers/swagger/client.md
##########
@@ -1,46 +1,31 @@
 Generate Apache Fineract API Client
 ============
 
-Apache Fineract supports client code generation using [Swagger 
Codegen](https://github.com/swagger-api/swagger-codegen). Project supports [all 
clients](https://github.com/swagger-api/swagger-codegen#overview) supported by 
Swagger Codegen. It uses [OpenAPI Specification Version 
3.0.3](https://swagger.io/specification/).
+Apache Fineract supports client code generation using [OpenAPI 
Generator](https://openapi-generator.tech). It uses [OpenAPI Specification 
Version 3.0.3](https://swagger.io/specification/).
 
 ## Generate API Client
 
-In root directory of the project:
+The API client is built as part of the overall Fineract Gradle build. If you 
want to save (maybe) some time you can try to execute just the following line 
in root directory of the project:
 
-- Run `./gradlew resolve`
-- Run `./gradlew generateSwaggerCode`
+- Run `./gradlew :fineract-client:build`
 
-The client code will be generated under `build/swagger-code-fineract`
+The client JAR can be found in `build/libs`.
 
-## Build API Client
+Note: just build fineract-client might or might not save you some time. There 
are still project module dependencies that might trigger a complete build.

Review comment:
       ```suggestion
   Note: Build only `fineract-client` may or may not actually save you some 
build time. There are still project module dependencies that might trigger a 
complete build.
   ```

##########
File path: .gitignore
##########
@@ -21,3 +21,4 @@ fineract-provider/src/main/resources/application.properties
 fineract-provider/out/
 fineract-provider/config/swagger/config.json
 fineract-provider/config/swagger/fineract-input.yaml
+fineract-client/config/swagger/templates/*.mustache

Review comment:
       @vidakovic this doesn't look right, is this intentional? Why?

##########
File path: docs/developers/swagger/client.md
##########
@@ -1,46 +1,31 @@
 Generate Apache Fineract API Client
 ============
 
-Apache Fineract supports client code generation using [Swagger 
Codegen](https://github.com/swagger-api/swagger-codegen). Project supports [all 
clients](https://github.com/swagger-api/swagger-codegen#overview) supported by 
Swagger Codegen. It uses [OpenAPI Specification Version 
3.0.3](https://swagger.io/specification/).
+Apache Fineract supports client code generation using [OpenAPI 
Generator](https://openapi-generator.tech). It uses [OpenAPI Specification 
Version 3.0.3](https://swagger.io/specification/).
 
 ## Generate API Client
 
-In root directory of the project:
+The API client is built as part of the overall Fineract Gradle build. If you 
want to save (maybe) some time you can try to execute just the following line 
in root directory of the project:
 
-- Run `./gradlew resolve`
-- Run `./gradlew generateSwaggerCode`
+- Run `./gradlew :fineract-client:build`
 
-The client code will be generated under `build/swagger-code-fineract`
+The client JAR can be found in `build/libs`.
 
-## Build API Client
+Note: just build fineract-client might or might not save you some time. There 
are still project module dependencies that might trigger a complete build.
 
-- Run `cd build/swagger-code-fineract`
-- Run `./gradlew build`
+## Customize Generated Code using Mustache Templates
 
-Alternatively, if you have Maven installed on your system, you can also do:
-
-- Run `cd build/swagger-code-fineract`
-- Run `mvn clean package`
-
-## Customize Generated Code
-
-Swagger Codegen provides several options to customize the generated code. 
[Here](https://openapi-generator.tech/docs/generators/java/) are the options 
available for customization.
-
-- Open the 
[config.json.template](https://github.com/apache/fineract/blob/develop/fineract-provider/config/swagger/config.json.template)
 file
-- Customize options
-- Build the project again as mentioned in **Generate API Client Code** section
-
-## Customize using Mustache Templates
-
-Swagger Codegen uses Mustache Templates for generating the client library. For 
additional customizations you can add/edit custom templates inside the 
`fineract-provider/config/swagger/templates` folder.
+The OpenAPI code generator uses Mustache Templates for generating the client 
library. For additional customizations you can add/edit custom templates inside 
the `fineract-client/config/swagger/templates` folder. Note: we are not 
maintaining any custom templates in the Git repository. Files that are added to 
this folder are ignored by Git.

Review comment:
       Oh, that's why the ignore. But... do we want this? Should we "support" 
that? Why? Should we just remove this entire section, to simplify things? I 
understand it's TECHNICALLY possible. I'm not sure we would want to deal with 
questions from anyone. @Grandolf49 any thoughts? @ptuomola any views?

##########
File path: fineract-provider/build.gradle
##########
@@ -600,21 +600,3 @@ gitProperties {
 
 // make sure the generateGitProperties task always executes (even when 
git.properties is not changed)
 generateGitProperties.outputs.upToDateWhen { false }
-
-task prepareConfigJson(dependsOn: 'generateGitProperties') {

Review comment:
       I didn't follow this in full details, but @ptuomola and/or @thesmallstar 
should review and sign off particularly on this change.. does that 
conversioning you wanted in the Swagger UI still work after this is removed?

##########
File path: fineract-client/build.gradle
##########
@@ -56,6 +56,7 @@ task buildJavaSdk(type: 
org.openapitools.generator.gradle.plugin.tasks.GenerateT
     ]
     generateModelTests = false
     generateApiTests = false
+    templateDir = "$projectDir/config/swagger/templates"

Review comment:
       as above, let's see what we agree. Sorry I'm so adamant about not 
wanting to keep this simple.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to