diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index ad069b78a..3cb708a5e 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -43,12 +43,9 @@ buildscript { classpath 'com.radcortez.gradle:openjpa-gradle-plugin:3.1.0' classpath 'gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.2.2' classpath "com.github.spotbugs:spotbugs-gradle-plugin:2.0.1" - //Use Guava version 23+ as a workaround to spotbug intergration. + // Use Guava version 23+ as a workaround to spotbug intergration. // See: https://github.com/spotbugs/spotbugs-gradle-plugin/issues/128#issuecomment-535864882 classpath 'com.google.guava:guava:28.1-jre' - - classpath "io.swagger.core.v3:swagger-gradle-plugin:2.0.8" - classpath "gradle.plugin.org.hidetake:gradle-swagger-generator-plugin:2.18.1" } } @@ -62,8 +59,6 @@ apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'com.bmuschko.tomcat' apply plugin: 'project-report' -apply plugin: 'java' -apply plugin: "org.hidetake.swagger.generator" apply plugin: 'java-library' apply plugin: 'openjpa' apply plugin: "com.github.spotbugs" @@ -212,7 +207,6 @@ rat { '**/docs/system-architecture/**/*.xml', '**/bootstrap-3.0.0/assets/application.js', '**/system-architecture/js/plugins.js', - '**/docs/interoperation/specification/json/*.json', //Apache License '**/bootstrap-3.0.0/assets/less.js', @@ -535,30 +529,3 @@ tasks.withType(SpotBugsTask) { reports.html.enabled = true reportLevel = "high" } - -// This is to save json file at build time -resolve { - outputFileName = 'response.json' - outputFormat = 'JSON' - prettyPrint = 'TRUE' - classpath = sourceSets.main.runtimeClasspath - resourcePackages = ['org.apache.fineract'] - outputPath = '/src/main/resources/swagger-ui/response.json' -} - -//This is for code and swagger UI generation -dependencies { - swaggerCodegen 'io.swagger:swagger-codegen-cli:2.4.2' // Swagger Codegen V2 - swaggerCodegen 'io.swagger.codegen.v3:swagger-codegen-cli:3.0.5' // or Swagger Codegen V3 - swaggerCodegen 'org.openapitools:openapi-generator-cli:3.3.4' // or OpenAPI Generator - swaggerUI 'org.webjars:swagger-ui:3.10.0' -} - -swaggerSources { - fineract { - inputFile = file('src/main/resources/swagger-ui/response.json') - code { - language = 'java' - } - } -} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/shareaccounts/api/SelfShareAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/shareaccounts/api/SelfShareAccountsApiResource.java index fe47677ff..db4332f6e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/shareaccounts/api/SelfShareAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/shareaccounts/api/SelfShareAccountsApiResource.java @@ -100,7 +100,6 @@ public class SelfShareAccountsApiResource { this.productReadPlatformService = productReadPlatformService; this.chargeReadPlatformService = chargeReadPlatformService; this.appUserShareAccountsMapperReadPlatformService = appUserShareAccountsMapperReadPlatformService; - } @GET @@ -114,7 +113,7 @@ public class SelfShareAccountsApiResource { @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SelfShareAccountsApiResourceSwagger.GetShareAccountsClientIdProductIdResponse.class)}) public String template(@QueryParam("clientId") @ApiParam("clientId") final Long clientId, @QueryParam("productId") @ApiParam("productId") final Long productId, @Context final UriInfo uriInfo) { - + validateAppuserClientsMapping(clientId); Collection productOptions = new ArrayList(); @@ -152,10 +151,10 @@ public class SelfShareAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - /* @ApiOperation(value = "Retrieve a share application/account", httpMethod = "GET", notes = "\n" + "\n" + "\n" + "Example Requests:\n" + "\n" + "self/shareaccounts/12\n") - @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response SelfShareAccountsApiResourceSwagger.GetShareAccountResponse.class)})*/ + // TODO actually write SelfShareAccountsApiResourceSwagger.GetShareAccountResponse (it currently does not exist) + // @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SelfShareAccountsApiResourceSwagger.GetShareAccountResponse.class)}) public String retrieveShareAccount(@PathParam("accountId") final Long accountId, @Context final UriInfo uriInfo) { validateAppuserShareAccountMapping(accountId); final boolean includeTemplate = false; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/shareaccounts/api/SelfShareAccountsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/shareaccounts/api/SelfShareAccountsApiResourceSwagger.java index 9a2177f68..8118750db 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/shareaccounts/api/SelfShareAccountsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/shareaccounts/api/SelfShareAccountsApiResourceSwagger.java @@ -643,14 +643,3 @@ final class SelfShareAccountsApiResourceSwagger { public Integer resourceId; } } - - - - - - - - - - -