From c582de2fb785f6bb897aaa19e1b1af72b8b55cb0 Mon Sep 17 00:00:00 2001 From: Peter Somogyvari Date: Sat, 11 Nov 2023 20:41:54 +0000 Subject: [PATCH] build(connector-corda): fix various Unresolved reference kotlin compiler errors 1. Started overriding a specific template (dataClass.mustache) in the main-server sub-package of the corda connector because of issues that are further explained here [1] and here [2]. 2. Also had to update generator configuration to specifically exclude spring-doc generation because it seems to be broken within the template as well: it does not provide updated dependencies for the grandle and maven manifests and so the `io.swagger.core.v3:swagger-annotations` package was missing and failing the build in a second way. 3. The example value for the return array of `ListFlowsV1Response` in the openapi.json spec file of the corda connector was containing dollar signs ($) which ended up being appended to the kotlin code's annotations as documentation, but the dollar signs have a special meaning in kotlin and lead to syntax errors. Updating the examples to not have dollar signs in the openapi.json specification document resulted in fixing this issue. 4. Also updated the artifact version in the openapi generator configuration file. This is just a temporary fix, what we really need is scripts bumping this up as part of the automated release process. [1] https://github.com/OpenAPITools/openapi-generator/issues/8366#issuecomment-1799795399 [2] https://github.com/OpenAPITools/openapi-generator/pull/17008 Fixes #2662 Signed-off-by: Peter Somogyvari --- .../package.json | 2 +- .../kotlin-spring/.openapi-generator/FILES | 3 - .../kotlin/gen/kotlin-spring/README.md | 4 +- .../kotlin/gen/kotlin-spring/pom.xml | 10 +- .../connector/corda/server/HomeController.kt | 17 --- .../corda/server/SpringDocConfiguration.kt | 32 ------ ...ApiPluginLedgerConnectorCordaController.kt | 104 ++++-------------- .../server/impl/StateMonitorClientSession.kt | 10 +- .../ClearMonitorTransactionsV1Request.kt | 5 - .../ClearMonitorTransactionsV1Response.kt | 4 - .../server/model/CordaNodeSshCredentials.kt | 7 -- .../corda/server/model/CordaRpcCredentials.kt | 6 - .../corda/server/model/CordaX500Name.kt | 9 -- .../server/model/CordappDeploymentConfig.kt | 8 -- .../corda/server/model/CordappInfo.kt | 11 -- .../DeployContractJarsBadRequestV1Response.kt | 3 - .../DeployContractJarsSuccessV1Response.kt | 3 - .../model/DeployContractJarsV1Request.kt | 4 - .../server/model/DiagnoseNodeV1Request.kt | 3 - .../server/model/DiagnoseNodeV1Response.kt | 3 - .../corda/server/model/FlowInvocationType.kt | 1 - .../model/GetMonitorTransactionsV1Request.kt | 4 - .../model/GetMonitorTransactionsV1Response.kt | 6 - ...GetMonitorTransactionsV1ResponseTxInner.kt | 4 - .../server/model/InvokeContractV1Request.kt | 6 - .../server/model/InvokeContractV1Response.kt | 7 -- .../connector/corda/server/model/JarFile.kt | 7 +- .../connector/corda/server/model/JvmObject.kt | 6 - .../connector/corda/server/model/JvmType.kt | 5 - .../corda/server/model/JvmTypeKind.kt | 1 - .../corda/server/model/ListFlowsV1Request.kt | 3 - .../corda/server/model/ListFlowsV1Response.kt | 3 - .../corda/server/model/NetworkHostAndPort.kt | 4 - .../corda/server/model/NodeDiagnosticInfo.kt | 7 -- .../connector/corda/server/model/NodeInfo.kt | 7 -- .../connector/corda/server/model/Party.kt | 4 - .../connector/corda/server/model/PublicKey.kt | 5 - .../connector/corda/server/model/SHA256.kt | 5 - .../server/model/StartMonitorV1Request.kt | 4 - .../server/model/StartMonitorV1Response.kt | 4 - .../server/model/StopMonitorV1Request.kt | 4 - .../server/model/StopMonitorV1Response.kt | 4 - .../corda/server/model/X500Principal.kt | 4 - .../src/main/resources/openapi.yaml | 6 - .../dataClass.mustache | 33 ++++++ .../main-server/openapi-generator-config.yaml | 6 +- .../src/main/json/openapi.json | 3 - 47 files changed, 68 insertions(+), 333 deletions(-) delete mode 100644 packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/HomeController.kt delete mode 100644 packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/SpringDocConfiguration.kt create mode 100644 packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/dataClass.mustache diff --git a/packages/cactus-plugin-ledger-connector-corda/package.json b/packages/cactus-plugin-ledger-connector-corda/package.json index 8cca127356..01251e38dc 100644 --- a/packages/cactus-plugin-ledger-connector-corda/package.json +++ b/packages/cactus-plugin-ledger-connector-corda/package.json @@ -48,7 +48,7 @@ "generate-sdk": "run-p 'generate-sdk:*'", "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected", "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/", - "generate-server": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin-spring -o ./src/main-server/kotlin/gen/kotlin-spring/ -c ./src/main-server/openapi-generator-config.yaml", + "generate-server": "yarn run --top-level openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin-spring -o ./src/main-server/kotlin/gen/kotlin-spring/ -c ./src/main-server/openapi-generator-config.yaml", "watch": "npm-watch", "webpack": "npm-run-all webpack:dev", "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/FILES index 64a8f4a148..5a2e4929d7 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/FILES +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/FILES @@ -1,8 +1,6 @@ README.md pom.xml settings.gradle -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/HomeController.kt -src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/SpringDocConfiguration.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaService.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiUtil.kt @@ -42,4 +40,3 @@ src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/mode src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Response.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/X500Principal.kt src/main/resources/application.yaml -src/main/resources/openapi.yaml diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/README.md b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/README.md index 5ef9db9e7e..075759bda5 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/README.md +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/README.md @@ -10,12 +10,12 @@ By default a [`pom.xml`](pom.xml) file will be generated. If you specified `grad To build the project using maven, run: ```bash -mvn package && java -jar target/cactus-connector-corda-server-0.3.0.jar +mvn package && java -jar target/cactus-connector-corda-server-2.0.0-alpha.2.jar ``` To build the project using gradle, run: ```bash -gradle build && java -jar build/libs/cactus-connector-corda-server-0.3.0.jar +gradle build && java -jar build/libs/cactus-connector-corda-server-2.0.0-alpha.2.jar ``` If all builds successfully, the server should run on [http://localhost:8080/](http://localhost:8080/) diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/pom.xml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/pom.xml index 572087265d..66de667130 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/pom.xml +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/pom.xml @@ -4,9 +4,8 @@ cactus-connector-corda-server jar cactus-connector-corda-server - 0.3.0 + 2.0.0-alpha.2 - 1.6.8 3.0.2 2.1.0 1.6.21 @@ -86,12 +85,7 @@ spring-boot-starter-web - - - org.springdoc - springdoc-openapi-ui - ${springdoc-openapi.version} - + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/HomeController.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/HomeController.kt deleted file mode 100644 index 7262726110..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/HomeController.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server - -import org.springframework.context.annotation.Bean -import org.springframework.stereotype.Controller -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.ResponseBody -import org.springframework.web.bind.annotation.GetMapping - -/** - * Home redirection to OpenAPI api documentation - */ -@Controller -class HomeController { - - @RequestMapping("/") - fun index(): String = "redirect:swagger-ui.html" -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/SpringDocConfiguration.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/SpringDocConfiguration.kt deleted file mode 100644 index e6719912e3..0000000000 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/SpringDocConfiguration.kt +++ /dev/null @@ -1,32 +0,0 @@ -package org.hyperledger.cactus.plugin.ledger.connector.corda.server - -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration - -import io.swagger.v3.oas.models.OpenAPI -import io.swagger.v3.oas.models.info.Info -import io.swagger.v3.oas.models.info.Contact -import io.swagger.v3.oas.models.info.License -import io.swagger.v3.oas.models.Components -import io.swagger.v3.oas.models.security.SecurityScheme - -@jakarta.annotation.Generated(value = ["org.openapitools.codegen.languages.KotlinSpringServerCodegen"]) -@Configuration -class SpringDocConfiguration { - - @Bean - fun apiInfo(): OpenAPI { - return OpenAPI() - .info( - Info() - .title("Hyperledger Cactus Plugin - Connector Corda") - .description("Can perform basic tasks on a Corda ledger") - .license( - License() - .name("Apache-2.0") - .url("https://www.apache.org/licenses/LICENSE-2.0.html") - ) - .version("v2.0.0-alpha.2") - ) - } -} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt index 41f830d388..4c90ba58cf 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt @@ -18,11 +18,6 @@ import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartMo import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartMonitorV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StopMonitorV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StopMonitorV1Response -import io.swagger.v3.oas.annotations.* -import io.swagger.v3.oas.annotations.enums.* -import io.swagger.v3.oas.annotations.media.* -import io.swagger.v3.oas.annotations.responses.* -import io.swagger.v3.oas.annotations.security.* import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.http.ResponseEntity @@ -50,82 +45,51 @@ import kotlin.collections.Map @RequestMapping("\${api.base-path:}") class ApiPluginLedgerConnectorCordaController(@Autowired(required = true) val service: ApiPluginLedgerConnectorCordaService) { - @Operation( - summary = "Clear transactions from internal store so they'll not be available by GetMonitorTransactionsV1 anymore.", - operationId = "clearMonitorTransactionsV1", - description = """""", - responses = [ - ApiResponse(responseCode = "200", description = "OK", content = [Content(schema = Schema(implementation = ClearMonitorTransactionsV1Response::class))]) ] - ) + @RequestMapping( method = [RequestMethod.DELETE], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions"], produces = ["application/json"], consumes = ["application/json"] ) - fun clearMonitorTransactionsV1(@Parameter(description = "") @Valid @RequestBody(required = false) clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request?): ResponseEntity { + fun clearMonitorTransactionsV1( @Valid @RequestBody(required = false) clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request?): ResponseEntity { return ResponseEntity(service.clearMonitorTransactionsV1(clearMonitorTransactionsV1Request), HttpStatus.valueOf(200)) } - @Operation( - summary = "Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak).", - operationId = "deployContractJarsV1", - description = """""", - responses = [ - ApiResponse(responseCode = "200", description = "OK", content = [Content(schema = Schema(implementation = DeployContractJarsSuccessV1Response::class))]), - ApiResponse(responseCode = "400", description = "Bad Request", content = [Content(schema = Schema(implementation = DeployContractJarsBadRequestV1Response::class))]) ] - ) + @RequestMapping( method = [RequestMethod.POST], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars"], produces = ["application/json"], consumes = ["application/json"] ) - fun deployContractJarsV1(@Parameter(description = "") @Valid @RequestBody(required = false) deployContractJarsV1Request: DeployContractJarsV1Request?): ResponseEntity { + fun deployContractJarsV1( @Valid @RequestBody(required = false) deployContractJarsV1Request: DeployContractJarsV1Request?): ResponseEntity { return ResponseEntity(service.deployContractJarsV1(deployContractJarsV1Request), HttpStatus.valueOf(200)) } - @Operation( - summary = "", - operationId = "diagnoseNodeV1", - description = """Responds with diagnostic information about the Corda node""", - responses = [ - ApiResponse(responseCode = "200", description = "OK", content = [Content(schema = Schema(implementation = DiagnoseNodeV1Response::class))]) ] - ) + @RequestMapping( method = [RequestMethod.POST], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node"], produces = ["application/json"], consumes = ["application/json"] ) - fun diagnoseNodeV1(@Parameter(description = "") @Valid @RequestBody(required = false) diagnoseNodeV1Request: DiagnoseNodeV1Request?): ResponseEntity { + fun diagnoseNodeV1( @Valid @RequestBody(required = false) diagnoseNodeV1Request: DiagnoseNodeV1Request?): ResponseEntity { return ResponseEntity(service.diagnoseNodeV1(diagnoseNodeV1Request), HttpStatus.valueOf(200)) } - @Operation( - summary = "Get transactions for monitored state classes.", - operationId = "getMonitorTransactionsV1", - description = """""", - responses = [ - ApiResponse(responseCode = "200", description = "OK", content = [Content(schema = Schema(implementation = GetMonitorTransactionsV1Response::class))]) ] - ) + @RequestMapping( method = [RequestMethod.GET], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions"], produces = ["application/json"], consumes = ["application/json"] ) - fun getMonitorTransactionsV1(@Parameter(description = "") @Valid @RequestBody(required = false) getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request?): ResponseEntity { + fun getMonitorTransactionsV1( @Valid @RequestBody(required = false) getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request?): ResponseEntity { return ResponseEntity(service.getMonitorTransactionsV1(getMonitorTransactionsV1Request), HttpStatus.valueOf(200)) } - @Operation( - summary = "Get the Prometheus Metrics", - operationId = "getPrometheusMetricsV1", - description = """""", - responses = [ - ApiResponse(responseCode = "200", description = "OK", content = [Content(schema = Schema(implementation = kotlin.String::class))]) ] - ) + @RequestMapping( method = [RequestMethod.GET], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics"], @@ -135,88 +99,58 @@ class ApiPluginLedgerConnectorCordaController(@Autowired(required = true) val se return ResponseEntity(service.getPrometheusMetricsV1(), HttpStatus.valueOf(200)) } - @Operation( - summary = "Invokes a contract on a Corda ledger (e.g. a flow)", - operationId = "invokeContractV1", - description = """""", - responses = [ - ApiResponse(responseCode = "200", description = "OK", content = [Content(schema = Schema(implementation = InvokeContractV1Response::class))]) ] - ) + @RequestMapping( method = [RequestMethod.POST], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract"], produces = ["application/json"], consumes = ["application/json"] ) - fun invokeContractV1(@Parameter(description = "") @Valid @RequestBody(required = false) invokeContractV1Request: InvokeContractV1Request?): ResponseEntity { + fun invokeContractV1( @Valid @RequestBody(required = false) invokeContractV1Request: InvokeContractV1Request?): ResponseEntity { return ResponseEntity(service.invokeContractV1(invokeContractV1Request), HttpStatus.valueOf(200)) } - @Operation( - summary = "", - operationId = "listFlowsV1", - description = """Responds with a list of the flows on the Corda node.""", - responses = [ - ApiResponse(responseCode = "200", description = "OK", content = [Content(schema = Schema(implementation = ListFlowsV1Response::class))]) ] - ) + @RequestMapping( method = [RequestMethod.POST], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows"], produces = ["application/json"], consumes = ["application/json"] ) - fun listFlowsV1(@Parameter(description = "") @Valid @RequestBody(required = false) listFlowsV1Request: ListFlowsV1Request?): ResponseEntity { + fun listFlowsV1( @Valid @RequestBody(required = false) listFlowsV1Request: ListFlowsV1Request?): ResponseEntity { return ResponseEntity(service.listFlowsV1(listFlowsV1Request), HttpStatus.valueOf(200)) } - @Operation( - summary = "", - operationId = "networkMapV1", - description = """Responds with a snapshot of the network map as provided by the Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun networkMapSnapshot(): List""", - responses = [ - ApiResponse(responseCode = "200", description = "OK", content = [Content(schema = Schema(implementation = NodeInfo::class))]) ] - ) + @RequestMapping( method = [RequestMethod.POST], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map"], produces = ["application/json"], consumes = ["application/json"] ) - fun networkMapV1(@Parameter(description = "") @Valid @RequestBody(required = false) body: kotlin.Any?): ResponseEntity> { + fun networkMapV1( @Valid @RequestBody(required = false) body: kotlin.Any?): ResponseEntity> { return ResponseEntity(service.networkMapV1(body), HttpStatus.valueOf(200)) } - @Operation( - summary = "Start monitoring corda changes (transactions) of given state class", - operationId = "startMonitorV1", - description = """""", - responses = [ - ApiResponse(responseCode = "200", description = "OK", content = [Content(schema = Schema(implementation = StartMonitorV1Response::class))]) ] - ) + @RequestMapping( method = [RequestMethod.POST], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor"], produces = ["application/json"], consumes = ["application/json"] ) - fun startMonitorV1(@Parameter(description = "") @Valid @RequestBody(required = false) startMonitorV1Request: StartMonitorV1Request?): ResponseEntity { + fun startMonitorV1( @Valid @RequestBody(required = false) startMonitorV1Request: StartMonitorV1Request?): ResponseEntity { return ResponseEntity(service.startMonitorV1(startMonitorV1Request), HttpStatus.valueOf(200)) } - @Operation( - summary = "Stop monitoring corda changes (transactions) of given state class", - operationId = "stopMonitorV1", - description = """""", - responses = [ - ApiResponse(responseCode = "200", description = "OK", content = [Content(schema = Schema(implementation = StopMonitorV1Response::class))]) ] - ) + @RequestMapping( method = [RequestMethod.DELETE], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor"], produces = ["application/json"], consumes = ["application/json"] ) - fun stopMonitorV1(@Parameter(description = "") @Valid @RequestBody(required = false) stopMonitorV1Request: StopMonitorV1Request?): ResponseEntity { + fun stopMonitorV1( @Valid @RequestBody(required = false) stopMonitorV1Request: StopMonitorV1Request?): ResponseEntity { return ResponseEntity(service.stopMonitorV1(stopMonitorV1Request), HttpStatus.valueOf(200)) } } diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/StateMonitorClientSession.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/StateMonitorClientSession.kt index 4be21d9537..61941137bb 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/StateMonitorClientSession.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/impl/StateMonitorClientSession.kt @@ -6,7 +6,7 @@ import net.corda.core.node.services.vault.DEFAULT_PAGE_NUM import net.corda.core.node.services.vault.PageSpecification import net.corda.core.node.services.vault.QueryCriteria import net.corda.core.utilities.loggerFor -import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1ResponseTx +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1ResponseTxInner import rx.Subscription import java.math.BigInteger import java.time.LocalDateTime @@ -26,7 +26,7 @@ class StateMonitorClientSession(private val rpc: NodeRPCConnection, private val * Simple data class for monitor reactive `subscription`, and queue of `stateChanges` received from corda */ private data class StateMonitor( - val stateChanges: MutableSet, + val stateChanges: MutableSet, val subscription: Subscription ) @@ -57,10 +57,10 @@ class StateMonitorClientSession(private val rpc: NodeRPCConnection, private val val stateUpdates = this.rpc.proxy.vaultTrackByWithPagingSpec(cordaState, criteria, pagingSpec).updates var indexCounter = BigInteger.valueOf(0) - val stateChanges = mutableSetOf() + val stateChanges = mutableSetOf() val monitorSub = stateUpdates.subscribe { update -> update.produced.forEach { change -> - val txResponse = GetMonitorTransactionsV1ResponseTx(indexCounter.toString(), change.toString()) + val txResponse = GetMonitorTransactionsV1ResponseTxInner(indexCounter.toString(), change.toString()) indexCounter = indexCounter.add(BigInteger.valueOf(1)) logger.debug("Pushing new transaction for state '{}', index {}", stateName, indexCounter) stateChanges.add(txResponse) @@ -78,7 +78,7 @@ class StateMonitorClientSession(private val rpc: NodeRPCConnection, private val * @param stateName String representation of corda state to monitor. * @return Set of corda state changes */ - fun getTransactions(stateName: String): MutableSet { + fun getTransactions(stateName: String): MutableSet { if (!monitors.containsKey(stateName)) { throw Exception("No monitor running for corda state $stateName on requested client") } diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Request.kt index 4764d1b157..bc44d5f87c 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Request.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Request.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -22,16 +21,12 @@ import io.swagger.v3.oas.annotations.media.Schema data class ClearMonitorTransactionsV1Request( @get:Size(min=1,max=1024) - @Schema(example = "frond_v1_x_7Hdg6s", required = true, description = "ID of a client application that wants to monitor the state changes") @get:JsonProperty("clientAppId", required = true) val clientAppId: kotlin.String, @get:Size(min=1,max=1024) - @Schema(example = "net.corda.samples.example.states.IOUState", required = true, description = "The fully qualified name of the Corda state to monitor") @get:JsonProperty("stateFullClassName", required = true) val stateFullClassName: kotlin.String, - @Schema(example = "null", required = true, description = "") @get:JsonProperty("txIndexes", required = true) val txIndexes: kotlin.collections.List = arrayListOf() ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Response.kt index c549441c7b..39c71000b6 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Response.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Response.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -20,12 +19,9 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class ClearMonitorTransactionsV1Response( - @Schema(example = "null", required = true, description = "Flag set to true if operation completed correctly.") @get:JsonProperty("success", required = true) val success: kotlin.Boolean, - @Schema(example = "null", required = true, description = "Message describing operation status or any errors that occurred.") @get:JsonProperty("msg", required = true) val msg: kotlin.String ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaNodeSshCredentials.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaNodeSshCredentials.kt index e43284b105..50e153b11f 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaNodeSshCredentials.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaNodeSshCredentials.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -24,26 +23,20 @@ import io.swagger.v3.oas.annotations.media.Schema data class CordaNodeSshCredentials( @get:Size(min=1,max=65535) - @Schema(example = "localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13", required = true, description = "") @get:JsonProperty("hostKeyEntry", required = true) val hostKeyEntry: kotlin.String, @get:Size(min=1,max=32) - @Schema(example = "null", required = true, description = "") @get:JsonProperty("username", required = true) val username: kotlin.String, @get:Size(min=1,max=4096) - @Schema(example = "null", required = true, description = "") @get:JsonProperty("password", required = true) val password: kotlin.String, @get:Size(min=1,max=4096) - @Schema(example = "null", required = true, description = "") @get:JsonProperty("hostname", required = true) val hostname: kotlin.String, @get:Min(1) @get:Max(65535) - @Schema(example = "null", required = true, description = "") @get:JsonProperty("port", required = true) val port: kotlin.Int ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaRpcCredentials.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaRpcCredentials.kt index 748f90d22d..60dc4b9ff5 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaRpcCredentials.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaRpcCredentials.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -23,22 +22,17 @@ import io.swagger.v3.oas.annotations.media.Schema data class CordaRpcCredentials( @get:Size(min=1,max=65535) - @Schema(example = "null", required = true, description = "") @get:JsonProperty("hostname", required = true) val hostname: kotlin.String, @get:Min(1) @get:Max(65535) - @Schema(example = "null", required = true, description = "") @get:JsonProperty("port", required = true) val port: kotlin.Int, @get:Size(min=1,max=1024) - @Schema(example = "null", required = true, description = "") @get:JsonProperty("username", required = true) val username: kotlin.String, @get:Size(min=1,max=65535) - @Schema(example = "null", required = true, description = "") @get:JsonProperty("password", required = true) val password: kotlin.String ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaX500Name.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaX500Name.kt index 30001d2e9d..356992db1a 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaX500Name.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaX500Name.kt @@ -12,7 +12,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -26,28 +25,20 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class CordaX500Name( - @Schema(example = "PartyA", required = true, description = "") @get:JsonProperty("organisation", required = true) val organisation: kotlin.String, - @Schema(example = "London", required = true, description = "") @get:JsonProperty("locality", required = true) val locality: kotlin.String, - @Schema(example = "GB", required = true, description = "") @get:JsonProperty("country", required = true) val country: kotlin.String, @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("x500Principal", required = true) val x500Principal: X500Principal, - @Schema(example = "null", description = "") @get:JsonProperty("commonName") val commonName: kotlin.String? = null, - @Schema(example = "null", description = "") @get:JsonProperty("organisationUnit") val organisationUnit: kotlin.String? = null, - @Schema(example = "null", description = "") @get:JsonProperty("state") val state: kotlin.String? = null ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappDeploymentConfig.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappDeploymentConfig.kt index 5f3932c48f..a0238b5b8d 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappDeploymentConfig.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappDeploymentConfig.kt @@ -13,7 +13,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -27,29 +26,22 @@ import io.swagger.v3.oas.annotations.media.Schema data class CordappDeploymentConfig( @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("sshCredentials", required = true) val sshCredentials: CordaNodeSshCredentials, @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("rpcCredentials", required = true) val rpcCredentials: CordaRpcCredentials, @get:Size(min=1,max=65535) - @Schema(example = "./build/nodes/runNodes", required = true, description = "The shell command to execute in order to start back up a Corda node after having placed new jars in the cordapp directory of said node.") @get:JsonProperty("cordaNodeStartCmd", required = true) val cordaNodeStartCmd: kotlin.String, @get:Size(min=1,max=2048) - @Schema(example = "null", required = true, description = "The absolute file system path where the Corda Node is expecting deployed Cordapp jar files to be placed.") @get:JsonProperty("cordappDir", required = true) val cordappDir: kotlin.String, @get:Size(min=1,max=2048) - @Schema(example = "null", required = true, description = "The absolute file system path where the corda.jar file of the node can be found. This is used to execute database schema migrations where applicable (H2 database in use in development environments).") @get:JsonProperty("cordaJarPath", required = true) val cordaJarPath: kotlin.String, @get:Size(min=1,max=2048) - @Schema(example = "null", required = true, description = "The absolute file system path where the base directory of the Corda node can be found. This is used to pass in to corda.jar when being invoked for certain tasks such as executing database schema migrations for a deployed contract.") @get:JsonProperty("nodeBaseDirPath", required = true) val nodeBaseDirPath: kotlin.String ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappInfo.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappInfo.kt index 1f54772686..3a7d70d818 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappInfo.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordappInfo.kt @@ -12,7 +12,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * A CordappInfo describes a single CorDapp currently installed on the node @@ -29,33 +28,23 @@ import io.swagger.v3.oas.annotations.media.Schema data class CordappInfo( @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("jarHash", required = true) val jarHash: SHA256, - @Schema(example = "null", required = true, description = "The name of the licence this CorDapp is released under") @get:JsonProperty("licence", required = true) val licence: kotlin.String, - @Schema(example = "null", required = true, description = "The minimum platform version the node must be at for the CorDapp to run") @get:JsonProperty("minimumPlatformVersion", required = true) val minimumPlatformVersion: kotlin.Int, - @Schema(example = "null", required = true, description = "The name of the JAR file that defines the CorDapp") @get:JsonProperty("name", required = true) val name: kotlin.String, - @Schema(example = "null", required = true, description = "The name of the CorDapp") @get:JsonProperty("shortName", required = true) val shortName: kotlin.String, - @Schema(example = "null", required = true, description = "The target platform version this CorDapp has been tested against") @get:JsonProperty("targetPlatformVersion", required = true) val targetPlatformVersion: kotlin.Int, - @Schema(example = "null", required = true, description = "A description of what sort of CorDapp this is - either a contract, workflow, or a combination.") @get:JsonProperty("type", required = true) val type: kotlin.String, - @Schema(example = "null", required = true, description = "The vendor of this CorDapp") @get:JsonProperty("vendor", required = true) val vendor: kotlin.String, - @Schema(example = "null", required = true, description = "The version of this CorDapp") @get:JsonProperty("version", required = true) val version: kotlin.String ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsBadRequestV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsBadRequestV1Response.kt index 9e822d7220..f245cd7489 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsBadRequestV1Response.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsBadRequestV1Response.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -19,9 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class DeployContractJarsBadRequestV1Response( - @Schema(example = "null", required = true, description = "") @get:JsonProperty("errors", required = true) val errors: kotlin.collections.List ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsSuccessV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsSuccessV1Response.kt index 44db5977ea..8b07a85c48 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsSuccessV1Response.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsSuccessV1Response.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -19,9 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class DeployContractJarsSuccessV1Response( - @Schema(example = "null", required = true, description = "") @get:JsonProperty("deployedJarFiles", required = true) val deployedJarFiles: kotlin.collections.List ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsV1Request.kt index d1d5224cf3..fd41b4e5df 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsV1Request.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DeployContractJarsV1Request.kt @@ -13,7 +13,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -23,13 +22,10 @@ import io.swagger.v3.oas.annotations.media.Schema data class DeployContractJarsV1Request( @field:Valid - @Schema(example = "null", required = true, description = "The list of deployment configurations pointing to the nodes where the provided cordapp jar files are to be deployed .") @get:JsonProperty("cordappDeploymentConfigs", required = true) val cordappDeploymentConfigs: kotlin.collections.List = arrayListOf(), @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("jarFiles", required = true) val jarFiles: kotlin.collections.List ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Request.kt index 0c1f49f9bb..c2979e9348 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Request.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Request.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -20,9 +19,7 @@ import io.swagger.v3.oas.annotations.media.Schema data class DiagnoseNodeV1Request( @get:Size(min=0,max=1024) - @Schema(example = "null", description = "Optional property specifying which Corda Node should be the one being diagnosed in case the Connector has multiple connections established for different nodes (which is not yet a supported feature, but we want to keep this possibility open for the future).") @get:JsonProperty("nodeIds") val nodeIds: kotlin.collections.List? = arrayListOf() ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Response.kt index 9a8dba5380..43e8e20100 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Response.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Response.kt @@ -12,7 +12,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -21,9 +20,7 @@ import io.swagger.v3.oas.annotations.media.Schema data class DiagnoseNodeV1Response( @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("nodeDiagnosticInfo", required = true) val nodeDiagnosticInfo: NodeDiagnosticInfo ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowInvocationType.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowInvocationType.kt index 990b398d95..bfe5af907e 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowInvocationType.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowInvocationType.kt @@ -12,7 +12,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * Determines which flow starting method will be used on the back-end when invoking the flow. Based on the value here the plugin back-end might invoke the rpc.startFlowDynamic() method or the rpc.startTrackedFlowDynamic() method. Streamed responses are aggregated and returned in a single response to HTTP callers who are not equipped to handle streams like WebSocket/gRPC/etc. do. diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Request.kt index df641538de..744656d336 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Request.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Request.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -21,13 +20,10 @@ import io.swagger.v3.oas.annotations.media.Schema data class GetMonitorTransactionsV1Request( @get:Size(min=1,max=1024) - @Schema(example = "frond_v1_x_7Hdg6s", required = true, description = "ID of a client application that wants to monitor the state changes") @get:JsonProperty("clientAppId", required = true) val clientAppId: kotlin.String, @get:Size(min=1,max=1024) - @Schema(example = "net.corda.samples.example.states.IOUState", required = true, description = "The fully qualified name of the Corda state to monitor") @get:JsonProperty("stateFullClassName", required = true) val stateFullClassName: kotlin.String ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Response.kt index d2d27d8b05..18cddccbab 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Response.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Response.kt @@ -12,7 +12,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -23,20 +22,15 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class GetMonitorTransactionsV1Response( - @Schema(example = "null", required = true, description = "Flag set to true if operation completed correctly.") @get:JsonProperty("success", required = true) val success: kotlin.Boolean, - @Schema(example = "null", required = true, description = "Message describing operation status or any errors that occurred.") @get:JsonProperty("msg", required = true) val msg: kotlin.String, @get:Size(min=1,max=1024) - @Schema(example = "net.corda.samples.example.states.IOUState", description = "The fully qualified name of the Corda state to monitor") @get:JsonProperty("stateFullClassName") val stateFullClassName: kotlin.String? = null, @field:Valid - @Schema(example = "null", description = "") @get:JsonProperty("tx") val tx: kotlin.collections.List? = arrayListOf() ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1ResponseTxInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1ResponseTxInner.kt index 198bb53fab..e94e873ee2 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1ResponseTxInner.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1ResponseTxInner.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -20,12 +19,9 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class GetMonitorTransactionsV1ResponseTxInner( - @Schema(example = "null", description = "") @get:JsonProperty("index") val index: kotlin.String? = null, - @Schema(example = "null", description = "") @get:JsonProperty("data") val `data`: kotlin.String? = null ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Request.kt index 04b6cbef4c..1e6b3cfc0d 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Request.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Request.kt @@ -14,7 +14,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -26,21 +25,16 @@ import io.swagger.v3.oas.annotations.media.Schema data class InvokeContractV1Request( @get:Size(min=1,max=1024) - @Schema(example = "net.corda.samples.obligation.flows.IOUIssueFlow", required = true, description = "The fully qualified name of the Corda flow to invoke") @get:JsonProperty("flowFullClassName", required = true) val flowFullClassName: kotlin.String, @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("flowInvocationType", required = true) val flowInvocationType: FlowInvocationType, @field:Valid - @Schema(example = "null", required = true, description = "The list of arguments to pass in to the contract method being invoked.") @get:JsonProperty("params", required = true) val params: kotlin.collections.List = arrayListOf(), @get:Min(0) - @Schema(example = "null", description = "The amount of milliseconds to wait for a transaction receipt beforegiving up and crashing.") @get:JsonProperty("timeoutMs") val timeoutMs: kotlin.Int? = 60000 ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Response.kt index fafa71bc35..14fe630993 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Response.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/InvokeContractV1Response.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -23,23 +22,17 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class InvokeContractV1Response( - @Schema(example = "null", required = true, description = "") @get:JsonProperty("success", required = true) val success: kotlin.Boolean, @field:Valid - @Schema(example = "null", required = true, description = "Data returned from the JVM when no transaction is running") @get:JsonProperty("callOutput", required = true) val callOutput: kotlin.Any, - @Schema(example = "null", required = true, description = "The id for the flow handle") @get:JsonProperty("flowId", required = true) val flowId: kotlin.String, @get:Size(min=1,max=1024) - @Schema(example = "null", description = "The net.corda.core.flows.StateMachineRunId value returned by the flow execution.") @get:JsonProperty("transactionId") val transactionId: kotlin.String? = null, - @Schema(example = "null", description = "An array of strings representing the aggregated stream of progress updates provided by a *tracked* flow invocation. If the flow invocation was not tracked, this array is still returned, but as empty.") @get:JsonProperty("progress") val progress: kotlin.collections.List? = arrayListOf() ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JarFile.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JarFile.kt index 96a8d0a641..38305d4ab6 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JarFile.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JarFile.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -22,16 +21,12 @@ import io.swagger.v3.oas.annotations.media.Schema data class JarFile( @get:Size(min=1,max=255) - @Schema(example = "null", required = true, description = "") @get:JsonProperty("filename", required = true) val filename: kotlin.String, - @Schema(example = "null", required = true, description = "Indicates whether the cordapp jar in question contains any embedded migrations that Cactus can/should execute between copying the jar into the cordapp directory and starting the node back up.") @get:JsonProperty("hasDbMigrations", required = true) val hasDbMigrations: kotlin.Boolean, @get:Size(min=1,max=1073741824) - @Schema(example = "null", required = true, description = "") @get:JsonProperty("contentBase64", required = true) val contentBase64: kotlin.String -) : kotlin.collections.HashMap{ +) : kotlin.collections.HashMap() { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmObject.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmObject.kt index 2f18036e2c..e99f2420b5 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmObject.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmObject.kt @@ -14,7 +14,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * Can represent JVM primitive and reference types as well. The jvmTypeKind field indicates which one is being stored. If the jvmTypeKind field is set to REFERENCE then the jvmCtorArgs array is expected to be filled, otherwise (e.g. PRIMITIVE jvmTypeKind) it is expected that the primitiveValue property is filled with a primitive data type supported by the JSON standard such as strings, booleans, numbers, etc. @@ -26,21 +25,16 @@ import io.swagger.v3.oas.annotations.media.Schema data class JvmObject( @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("jvmTypeKind", required = true) val jvmTypeKind: JvmTypeKind, @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("jvmType", required = true) val jvmType: JvmType, @field:Valid - @Schema(example = "null", description = "") @get:JsonProperty("primitiveValue") val primitiveValue: kotlin.Any? = null, @field:Valid - @Schema(example = "null", description = "") @get:JsonProperty("jvmCtorArgs") val jvmCtorArgs: kotlin.collections.List? = arrayListOf() ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmType.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmType.kt index d760b5774c..37f7c6e3e7 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmType.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmType.kt @@ -12,7 +12,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * Represents a reference to a JVM type (such as a Java class) @@ -23,17 +22,13 @@ import io.swagger.v3.oas.annotations.media.Schema data class JvmType( @get:Size(min=1,max=65535) - @Schema(example = "null", required = true, description = "") @get:JsonProperty("fqClassName", required = true) val fqClassName: kotlin.String, @get:Size(min=1,max=65535) - @Schema(example = "null", description = "This parameter is used to specify that the function used to construct this JvmType is not a constructor function but instead is a factory function. Setting this parameter will cause the plugin to look up methods of the class denoted by fqClassName instead of its constructors.") @get:JsonProperty("constructorName") val constructorName: kotlin.String? = null, @field:Valid - @Schema(example = "null", description = "") @get:JsonProperty("invocationTarget") val invocationTarget: JvmObject? = null ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmTypeKind.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmTypeKind.kt index 1d02060288..a4a3c51084 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmTypeKind.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmTypeKind.kt @@ -12,7 +12,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Request.kt index 3c83e38380..aad5c105e9 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Request.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Request.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -19,9 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class ListFlowsV1Request( - @Schema(example = "null", description = "") @get:JsonProperty("filter") val filter: kotlin.String? = null ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Response.kt index a3fd13044b..660e823aef 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Response.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Response.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -19,9 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class ListFlowsV1Response( - @Schema(example = "[\"net.corda.core.flows.ContractUpgradeFlow$Authorise\",\"net.corda.core.flows.ContractUpgradeFlow$Deauthorise\",\"net.corda.core.flows.ContractUpgradeFlow$Initiate\",\"net.corda.finance.flows.CashExitFlow\",\"net.corda.finance.flows.CashIssueAndPaymentFlow\",\"net.corda.finance.flows.CashIssueFlow\",\"net.corda.finance.flows.CashPaymentFlow\",\"net.corda.finance.internal.CashConfigDataFlow\",\"net.corda.samples.obligation.flows.IOUIssueFlow\",\"net.corda.samples.obligation.flows.IOUSettleFlow\",\"net.corda.samples.obligation.flows.IOUTransferFlow\",\"net.corda.samples.obligation.flows.SelfIssueCashFlow\"]", required = true, description = "An array of strings storing the names of the flows as returned by the flowList Corda RPC.") @get:JsonProperty("flowNames", required = true) val flowNames: kotlin.collections.List = arrayListOf() ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NetworkHostAndPort.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NetworkHostAndPort.kt index a41cc33dc2..435be03ea3 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NetworkHostAndPort.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NetworkHostAndPort.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -20,12 +19,9 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class NetworkHostAndPort( - @Schema(example = "null", required = true, description = "") @get:JsonProperty("host", required = true) val host: kotlin.String, - @Schema(example = "null", required = true, description = "") @get:JsonProperty("port", required = true) val port: java.math.BigDecimal ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeDiagnosticInfo.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeDiagnosticInfo.kt index 8744b1c65a..d5d0b24161 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeDiagnosticInfo.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeDiagnosticInfo.kt @@ -12,7 +12,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * A NodeDiagnosticInfo holds information about the current node version. @@ -26,21 +25,15 @@ data class NodeDiagnosticInfo( @field:Valid @get:Size(min=0,max=4096) - @Schema(example = "null", required = true, description = "A list of CorDapps currently installed on this node") @get:JsonProperty("cordapps", required = true) val cordapps: kotlin.collections.List, - @Schema(example = "null", required = true, description = "The platform version of this node. This number represents a released API version, and should be used to make functionality decisions (e.g. enabling an app feature only if an underlying platform feature exists)") @get:JsonProperty("platformVersion", required = true) val platformVersion: kotlin.Int, - @Schema(example = "null", required = true, description = "The git commit hash this node was built from") @get:JsonProperty("revision", required = true) val revision: kotlin.String, - @Schema(example = "null", required = true, description = "The vendor of this node") @get:JsonProperty("vendor", required = true) val vendor: kotlin.String, - @Schema(example = "null", required = true, description = "The current node version string, e.g. 4.3, 4.4-SNAPSHOT. Note that this string is effectively freeform, and so should only be used for providing diagnostic information. It should not be used to make functionality decisions (the platformVersion is a better fit for this).") @get:JsonProperty("version", required = true) val version: kotlin.String ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeInfo.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeInfo.kt index e839c210da..ef886f1bba 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeInfo.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NodeInfo.kt @@ -13,7 +13,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -26,23 +25,17 @@ import io.swagger.v3.oas.annotations.media.Schema data class NodeInfo( @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("addresses", required = true) val addresses: kotlin.collections.List, - @Schema(example = "null", required = true, description = "") @get:JsonProperty("platformVersion", required = true) val platformVersion: kotlin.Int, - @Schema(example = "null", required = true, description = "") @get:JsonProperty("serial", required = true) val serial: java.math.BigDecimal, @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("legalIdentities", required = true) val legalIdentities: kotlin.collections.List, @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("legalIdentitiesAndCerts", required = true) val legalIdentitiesAndCerts: kotlin.collections.List ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/Party.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/Party.kt index 5a120eb4d0..3357599b14 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/Party.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/Party.kt @@ -13,7 +13,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -23,13 +22,10 @@ import io.swagger.v3.oas.annotations.media.Schema data class Party( @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("name", required = true) val name: CordaX500Name, @field:Valid - @Schema(example = "null", required = true, description = "") @get:JsonProperty("owningKey", required = true) val owningKey: PublicKey ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/PublicKey.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/PublicKey.kt index a2ff65965e..1028a74e76 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/PublicKey.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/PublicKey.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * An instance of a java.security.PublicKey (which is an interface) implementation such as org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl @@ -21,15 +20,11 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class PublicKey( - @Schema(example = "EdDSA", required = true, description = "") @get:JsonProperty("algorithm", required = true) val algorithm: kotlin.String, - @Schema(example = "X.509", required = true, description = "") @get:JsonProperty("format", required = true) val format: kotlin.String, - @Schema(example = "MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54=", required = true, description = "") @get:JsonProperty("encoded", required = true) val encoded: kotlin.String ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/SHA256.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/SHA256.kt index f326aac946..dd82e7f257 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/SHA256.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/SHA256.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * SHA-256 is part of the SHA-2 hash function family. Generated hash is fixed size, 256-bits (32-bytes). @@ -21,15 +20,11 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class SHA256( - @Schema(example = "Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc=", required = true, description = "") @get:JsonProperty("bytes", required = true) val bytes: kotlin.String, - @Schema(example = "0", required = true, description = "") @get:JsonProperty("offset", required = true) val offset: kotlin.Int, - @Schema(example = "32", required = true, description = "") @get:JsonProperty("size", required = true) val propertySize: kotlin.Int ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Request.kt index 41b18d278d..29c3be5b86 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Request.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Request.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -21,13 +20,10 @@ import io.swagger.v3.oas.annotations.media.Schema data class StartMonitorV1Request( @get:Size(min=1,max=1024) - @Schema(example = "frond_v1_x_7Hdg6s", required = true, description = "ID of a client application that wants to monitor the state changes") @get:JsonProperty("clientAppId", required = true) val clientAppId: kotlin.String, @get:Size(min=1,max=1024) - @Schema(example = "net.corda.samples.example.states.IOUState", required = true, description = "The fully qualified name of the Corda state to monitor") @get:JsonProperty("stateFullClassName", required = true) val stateFullClassName: kotlin.String ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Response.kt index a4e32a15f3..887b86e828 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Response.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Response.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -20,12 +19,9 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class StartMonitorV1Response( - @Schema(example = "null", required = true, description = "Flag set to true if monitoring started correctly.") @get:JsonProperty("success", required = true) val success: kotlin.Boolean, - @Schema(example = "null", required = true, description = "Message describing operation status or any errors that occurred.") @get:JsonProperty("msg", required = true) val msg: kotlin.String ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Request.kt index 968318cd8e..a37c21aacc 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Request.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Request.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -21,13 +20,10 @@ import io.swagger.v3.oas.annotations.media.Schema data class StopMonitorV1Request( @get:Size(min=1,max=1024) - @Schema(example = "frond_v1_x_7Hdg6s", required = true, description = "ID of a client application that wants to monitor the state changes") @get:JsonProperty("clientAppId", required = true) val clientAppId: kotlin.String, @get:Size(min=1,max=1024) - @Schema(example = "net.corda.samples.example.states.IOUState", required = true, description = "The fully qualified name of the Corda state to monitor") @get:JsonProperty("stateFullClassName", required = true) val stateFullClassName: kotlin.String ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Response.kt index fcf3152d49..62aab56d12 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Response.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Response.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -20,12 +19,9 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class StopMonitorV1Response( - @Schema(example = "null", required = true, description = "Flag set to true if operation completed correctly.") @get:JsonProperty("success", required = true) val success: kotlin.Boolean, - @Schema(example = "null", required = true, description = "Message describing operation status or any errors that occurred.") @get:JsonProperty("msg", required = true) val msg: kotlin.String ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/X500Principal.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/X500Principal.kt index 8e91ee5ff6..dd8a56df0b 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/X500Principal.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/X500Principal.kt @@ -11,7 +11,6 @@ import javax.validation.constraints.NotNull import javax.validation.constraints.Pattern import javax.validation.constraints.Size import javax.validation.Valid -import io.swagger.v3.oas.annotations.media.Schema /** * @@ -20,12 +19,9 @@ import io.swagger.v3.oas.annotations.media.Schema */ data class X500Principal( - @Schema(example = "O=PartyA,L=London,C=GB", required = true, description = "") @get:JsonProperty("name", required = true) val name: kotlin.String, - @Schema(example = "MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ==", required = true, description = "Base64 encoded public key") @get:JsonProperty("encoded", required = true) val encoded: kotlin.String ) { } - diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/openapi.yaml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/openapi.yaml index 07a90c1a42..7403608a04 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/openapi.yaml +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/openapi.yaml @@ -1051,9 +1051,6 @@ components: ListFlowsV1Response: example: flowNames: - - net.corda.core.flows.ContractUpgradeFlow$Authorise - - net.corda.core.flows.ContractUpgradeFlow$Deauthorise - - net.corda.core.flows.ContractUpgradeFlow$Initiate - net.corda.finance.flows.CashExitFlow - net.corda.finance.flows.CashIssueAndPaymentFlow - net.corda.finance.flows.CashIssueFlow @@ -1069,9 +1066,6 @@ components: description: An array of strings storing the names of the flows as returned by the flowList Corda RPC. example: - - net.corda.core.flows.ContractUpgradeFlow$Authorise - - net.corda.core.flows.ContractUpgradeFlow$Deauthorise - - net.corda.core.flows.ContractUpgradeFlow$Initiate - net.corda.finance.flows.CashExitFlow - net.corda.finance.flows.CashIssueAndPaymentFlow - net.corda.finance.flows.CashIssueFlow diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/dataClass.mustache b/packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/dataClass.mustache new file mode 100644 index 0000000000..e9559f8fd8 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/mustache/generator-template-overrides/dataClass.mustache @@ -0,0 +1,33 @@ +/** + * {{{description}}} +{{#vars}} + * @param {{name}} {{{description}}} +{{/vars}} + */{{#discriminator}} +{{>typeInfoAnnotation}}{{/discriminator}} +{{#discriminator}}interface {{classname}}{{/discriminator}}{{^discriminator}}{{#hasVars}}data {{/hasVars}}class {{classname}}( +{{#requiredVars}} +{{>dataClassReqVar}}{{^-last}}, +{{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}}, +{{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>dataClassOptVar}}{{^-last}}, +{{/-last}}{{/optionalVars}} +) {{/discriminator}}{{#parent}}: {{{.}}}() {{/parent}}{ +{{#discriminator}} + {{#requiredVars}} + {{>interfaceReqVar}} + {{/requiredVars}} + {{#optionalVars}} + {{>interfaceOptVar}} + {{/optionalVars}} +{{/discriminator}} +{{#hasEnums}}{{#vars}}{{#isEnum}} + /** + * {{{description}}} + * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} + */ + enum class {{{nameInCamelCase}}}(val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) { +{{#allowableValues}}{{#enumVars}} + @JsonProperty({{{value}}}) {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} + } +{{/isEnum}}{{/vars}}{{/hasEnums}} +} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/openapi-generator-config.yaml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/openapi-generator-config.yaml index d971ef1db7..cdc85c97f4 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/openapi-generator-config.yaml +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/openapi-generator-config.yaml @@ -1,16 +1,20 @@ +templateDir: src/main-server/mustache/generator-template-overrides/ + additionalProperties: title: "Hyperledger Cactus - Corda Ledger Connector Plugin Server" groupId: org.hyperledger.cactus artifactId: cactus-connector-corda-server # TODO: Make sure this automatically gets bumped during releases so that it # remains in sync with the package.json version number. - artifactVersion: 0.3.0 + artifactVersion: 2.0.0-alpha.2 apiSuffix: PluginLedgerConnectorCorda basePackage: org.hyperledger.cactus.plugin.ledger.connector.corda.server packageName: org.hyperledger.cactus.plugin.ledger.connector.corda.server apiPackage: org.hyperledger.cactus.plugin.ledger.connector.corda.server.api modelPackage: org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + documentationProvider: none + enumPropertyNaming: UPPERCASE delegatePattern: false serviceImplementation: true diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.json index 5e49e7bc9a..1362fb03e1 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.json +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.json @@ -679,9 +679,6 @@ "type": "array", "description": "An array of strings storing the names of the flows as returned by the flowList Corda RPC.", "example": [ - "net.corda.core.flows.ContractUpgradeFlow$Authorise", - "net.corda.core.flows.ContractUpgradeFlow$Deauthorise", - "net.corda.core.flows.ContractUpgradeFlow$Initiate", "net.corda.finance.flows.CashExitFlow", "net.corda.finance.flows.CashIssueAndPaymentFlow", "net.corda.finance.flows.CashIssueFlow",