diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index 08b905d42..ddc80c209 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -196,11 +196,11 @@ openjpa { resolve { logging.captureStandardOutput LogLevel.INFO outputFileName = 'fineract' - outputFormat = 'JSON' + outputFormat = 'YAML' prettyPrint = 'TRUE' classpath = sourceSets.main.runtimeClasspath outputDir = file("${buildDir}/classes/java/main/static/swagger-ui") - openApiFile = file("config/swagger/fineract-input.json") + openApiFile = file("config/swagger/fineract-input.yaml") } // Configuration for JaCoCo code coverage task diff --git a/fineract-provider/config/swagger/fineract-input.json b/fineract-provider/config/swagger/fineract-input.json deleted file mode 100644 index 264ad5629..000000000 --- a/fineract-provider/config/swagger/fineract-input.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "openapi" : "3.0.3", - "info": { - "version": "1.4.0", - "title": "Apache Fineract", - "description": "Apache Fineract is a secure, multi-tenanted microfinance platform\n\nThe goal of the Apache Fineract API is to empower developers to build apps on top of the Apache Fineract Platform
The [reference app](https://cui.fineract.dev) (username: mifos, password: password) works on the same demo tenant as the interactive links in this documentation\n\n- The API is organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer)\n- Find out more about Apache Fineract [here](/fineract-provider/api-docs/apiLive.htm#top)\n- You can [Try The API From Your Browser](/fineract-provider/api-docs/apiLive.htm#interact)\n- The Generic Options are available [here](/fineract-provider/api-docs/apiLive.htm#genopts)\n- Find out more about [Updating Dates and Numbers](/fineract-provider/api-docs/apiLive.htm#dates_and_numbers)\n- For the Authentication and the Basic of HTTP and HTTPS refer [here](/fineract-provider/api-docs/apiLive.htm#authentication_overview)\n- Check about ERROR codes [here](/fineract-provider/api-docs/apiLive.htm#errors)\n\nPlease refer to the [old documentation](/fineract-provider/api-docs/apiLive.htm) for any documentation queries", - "termsOfService": "https://demo.fineract.dev/fineract-provider/api-docs/apiLive.htm", - "contact": { - "email": "dev@fineract.apache.org" - }, - "license": { - "name": "Apache 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" - } - } -} diff --git a/fineract-provider/config/swagger/fineract-input.yaml b/fineract-provider/config/swagger/fineract-input.yaml new file mode 100644 index 000000000..5e78370bc --- /dev/null +++ b/fineract-provider/config/swagger/fineract-input.yaml @@ -0,0 +1,37 @@ +openapi: 3.0.3 +info: + version: 1.4.0 + title: Apache Fineract + description: |- + Apache Fineract is a secure, multi-tenanted microfinance platform + + The goal of the Apache Fineract API is to empower developers to build apps on top of the Apache Fineract Platform
The [reference app](https://cui.fineract.dev) (username: mifos, password: password) works on the same demo tenant as the interactive links in this documentation + + - The API is organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) + - Find out more about Apache Fineract [here](/fineract-provider/api-docs/apiLive.htm#top) + - You can [Try The API From Your Browser](/fineract-provider/api-docs/apiLive.htm#interact) + - The Generic Options are available [here](/fineract-provider/api-docs/apiLive.htm#genopts) + - Find out more about [Updating Dates and Numbers](/fineract-provider/api-docs/apiLive.htm#dates_and_numbers) + - For the Authentication and the Basic of HTTP and HTTPS refer [here](/fineract-provider/api-docs/apiLive.htm#authentication_overview) + - Check about ERROR codes [here](/fineract-provider/api-docs/apiLive.htm#errors) + + Please refer to the [old documentation](/fineract-provider/api-docs/apiLive.htm) for any documentation queries + contact: + email: dev@fineract.apache.org + license: + name: Apache 2.0 + url: 'http://www.apache.org/licenses/LICENSE-2.0.html' +servers: +- url: /fineract-provider/api/v1 +components: + securitySchemes: + basicAuth: + type: http + scheme: basic + tenantid: + type: apiKey + in: header + name: fineract-platform-tenantid +security: + - basicAuth: [] + tenantid: [] \ No newline at end of file diff --git a/fineract-provider/src/main/resources/static/swagger-ui/index.html b/fineract-provider/src/main/resources/static/swagger-ui/index.html index 3408ce2da..b5a6fe02b 100644 --- a/fineract-provider/src/main/resources/static/swagger-ui/index.html +++ b/fineract-provider/src/main/resources/static/swagger-ui/index.html @@ -39,7 +39,7 @@ window.onload = function() { // Begin Swagger UI call region const ui = SwaggerUIBundle({ - url: "fineract.json", + url: "fineract.yaml", dom_id: '#swagger-ui', deepLinking: true, filter: '', @@ -50,11 +50,15 @@ plugins: [ SwaggerUIBundle.plugins.DownloadUrl ], - layout: "BaseLayout" + layout: "BaseLayout", + onComplete: function() { + ui.preauthorizeBasic("basicAuth", "mifos", "password"); + ui.preauthorizeApiKey("tenantid", "default"); + } }) // End Swagger UI call region - window.ui = ui + }