FINERACT-835: Upgrade Swagger and automatically generate the JSON spec (#1069)
Co-authored-by: Michael Vorburger ⛑️ <mike@vorburger.ch>
This commit is contained in:
co-authored by
Michael Vorburger ⛑️
parent
e234980cd3
commit
7ec5229e23
@@ -49,6 +49,7 @@ buildscript {
|
||||
classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:2.2.2"
|
||||
classpath "net.ltgt.gradle:gradle-errorprone-plugin:1.2.1"
|
||||
classpath "com.diffplug.spotless:spotless-plugin-gradle:4.4.0"
|
||||
classpath "io.swagger.core.v3:swagger-gradle-plugin:2.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +72,7 @@ apply plugin: 'jacoco'
|
||||
apply plugin: "com.gorylenko.gradle-git-properties"
|
||||
apply plugin: "net.ltgt.errorprone"
|
||||
apply plugin: "com.diffplug.gradle.spotless"
|
||||
// apply plugin: 'pmd'
|
||||
apply plugin: "io.swagger.core.v3.swagger-gradle-plugin"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
@@ -114,6 +115,9 @@ dependencyManagement {
|
||||
dependency 'com.github.spotbugs:spotbugs-annotations:4.0.4'
|
||||
dependency 'javax.cache:cache-api:1.1.1'
|
||||
|
||||
// If this is upgraded, you need to change path in WebFrontEndConfiguration
|
||||
dependency 'org.webjars.npm:swagger-ui-dist:3.26.0'
|
||||
|
||||
dependency ('org.dom4j:dom4j:2.1.3') {
|
||||
exclude 'relaxngDatatype:relaxngDatatype' // already in com.sun.xml.bind:jaxb-osgi:2.3.0.1
|
||||
// FINERACT-940 && FINERACT-966 https://github.com/spotbugs/spotbugs/issues/1128
|
||||
@@ -181,6 +185,18 @@ openjpa {
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration for Swagger documentation generation task
|
||||
// https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin
|
||||
resolve {
|
||||
outputFileName = 'fineract'
|
||||
outputFormat = 'JSON'
|
||||
prettyPrint = 'TRUE'
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
outputDir = file("${buildDir}/classes/java/main/static/swagger-ui")
|
||||
}
|
||||
|
||||
// Configuration for JaCoCo code coverage task
|
||||
// https://www.eclemma.org/jacoco/
|
||||
jacoco {
|
||||
toolVersion = jacocoVersion
|
||||
reportsDir = file("$buildDir/reports/jacoco")
|
||||
@@ -244,6 +260,8 @@ spotless {
|
||||
lineEndings 'UNIX'
|
||||
}
|
||||
|
||||
// Configuration for Apache Release Audit Tool task
|
||||
// https://github.com/eskatos/creadur-rat-gradle
|
||||
rat {
|
||||
verbose = false
|
||||
reportDir = new File(buildDir,'reports/rat')
|
||||
@@ -274,7 +292,7 @@ rat {
|
||||
'**/NOTICE_RELEASE',
|
||||
'**/NOTICE_SOURCE',
|
||||
// Swagger License
|
||||
'**/src/main/resources/swagger-ui/**',
|
||||
'**/src/main/resources/static/swagger-ui/**',
|
||||
// gradle
|
||||
'**/.gradle/**',
|
||||
'**/gradlew',
|
||||
@@ -522,6 +540,7 @@ modernizer {
|
||||
compileJava{
|
||||
dependsOn rat
|
||||
dependsOn spotlessCheck
|
||||
finalizedBy resolve
|
||||
}
|
||||
/*
|
||||
pmd {
|
||||
@@ -556,7 +575,7 @@ license {
|
||||
"**/*.mustache",
|
||||
"**/package-info.java",
|
||||
"**/keystore.jks",
|
||||
"**/swagger-ui/**",
|
||||
"**/static/swagger-ui/**",
|
||||
"**/api-docs/**",
|
||||
])
|
||||
strictCheck true
|
||||
|
||||
Reference in New Issue
Block a user