FINERACT-842 Made TRY-IT swagger button work

This commit is contained in:
Manthan Surkar
2020-07-20 11:53:23 +02:00
committed by Michael Vorburger ⛑️
parent b4621b2a71
commit a84edce73b
4 changed files with 46 additions and 21 deletions
+2 -2
View File
@@ -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
@@ -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<br>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"
}
}
}
@@ -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<br>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: []
@@ -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
}
</script>
</body>