vidakovic commented on a change in pull request #1418: URL: https://github.com/apache/fineract/pull/1418#discussion_r506983407
########## 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: You tell me... I'm neither here nor their. Personally I tend more to explicitly providing generated clients like "normal" Java client, RxJava client, TypeScript client etc. (see SDK discussion). Otherwise people will start asking about their custom templates... ---------------------------------------------------------------- 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]
