Skip to content

Commit

Permalink
fix(connector-corda): regenerate kotlin backend with correct version
Browse files Browse the repository at this point in the history
Previously the kotlin code was being generated with the 5.0.0 version of the
openapi generator via their published container image, but then we were
forced to stop using that method of invocation because it doesn't work during
the build of our own images to call another docker image.
This then lead to the sources updating being forgotten and the changes
being made by the build every time ever since which will now be resolved.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Mar 31, 2021
1 parent 78e6754 commit 34f8e17
Show file tree
Hide file tree
Showing 28 changed files with 78 additions and 151 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.0
5.0.0-beta2
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ApiPluginLedgerConnectorCordaController(@Autowired(required = true) val se
produces = ["application/json"],
consumes = ["application/json"]
)
fun deployContractJarsV1( @Valid @RequestBody(required = false) deployContractJarsV1Request: DeployContractJarsV1Request?
fun deployContractJarsV1( @Valid @RequestBody deployContractJarsV1Request: DeployContractJarsV1Request?
): ResponseEntity<DeployContractJarsSuccessV1Response> {
return ResponseEntity(service.deployContractJarsV1(deployContractJarsV1Request), HttpStatus.valueOf(200))
}
Expand All @@ -53,7 +53,7 @@ class ApiPluginLedgerConnectorCordaController(@Autowired(required = true) val se
produces = ["application/json"],
consumes = ["application/json"]
)
fun diagnoseNodeV1( @Valid @RequestBody(required = false) diagnoseNodeV1Request: DiagnoseNodeV1Request?
fun diagnoseNodeV1( @Valid @RequestBody diagnoseNodeV1Request: DiagnoseNodeV1Request?
): ResponseEntity<DiagnoseNodeV1Response> {
return ResponseEntity(service.diagnoseNodeV1(diagnoseNodeV1Request), HttpStatus.valueOf(200))
}
Expand All @@ -64,7 +64,7 @@ class ApiPluginLedgerConnectorCordaController(@Autowired(required = true) val se
produces = ["application/json"],
consumes = ["application/json"]
)
fun invokeContractV1( @Valid @RequestBody(required = false) invokeContractV1Request: InvokeContractV1Request?
fun invokeContractV1( @Valid @RequestBody invokeContractV1Request: InvokeContractV1Request?
): ResponseEntity<InvokeContractV1Response> {
return ResponseEntity(service.invokeContractV1(invokeContractV1Request), HttpStatus.valueOf(200))
}
Expand All @@ -75,7 +75,7 @@ class ApiPluginLedgerConnectorCordaController(@Autowired(required = true) val se
produces = ["application/json"],
consumes = ["application/json"]
)
fun listFlowsV1( @Valid @RequestBody(required = false) listFlowsV1Request: ListFlowsV1Request?
fun listFlowsV1( @Valid @RequestBody listFlowsV1Request: ListFlowsV1Request?
): ResponseEntity<ListFlowsV1Response> {
return ResponseEntity(service.listFlowsV1(listFlowsV1Request), HttpStatus.valueOf(200))
}
Expand All @@ -86,7 +86,7 @@ class ApiPluginLedgerConnectorCordaController(@Autowired(required = true) val se
produces = ["application/json"],
consumes = ["application/json"]
)
fun networkMapV1( @Valid @RequestBody(required = false) body: kotlin.Any?
fun networkMapV1( @Valid @RequestBody body: kotlin.Any?
): ResponseEntity<List<NodeInfo>> {
return ResponseEntity(service.networkMapV1(body), HttpStatus.valueOf(200))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import javax.validation.Valid

/**
*
Expand All @@ -21,25 +20,19 @@ import javax.validation.Valid
*/
data class CordaNodeSshCredentials(

@get:NotNull
@get:Size(min=1,max=65535)
@get:NotNull @get:Size(min=1,max=65535)
@field:JsonProperty("hostKeyEntry") val hostKeyEntry: kotlin.String,

@get:NotNull
@get:Size(min=1,max=32)
@get:NotNull @get:Size(min=1,max=32)
@field:JsonProperty("username") val username: kotlin.String,

@get:NotNull
@get:Size(min=1,max=4096)
@get:NotNull @get:Size(min=1,max=4096)
@field:JsonProperty("password") val password: kotlin.String,

@get:NotNull
@get:Size(min=1,max=4096)
@get:NotNull @get:Size(min=1,max=4096)
@field:JsonProperty("hostname") val hostname: kotlin.String,

@get:NotNull
@get:Min(1)
@get:Max(65535)
@get:NotNull @get:Min(1) @get:Max(65535)
@field:JsonProperty("port") val port: kotlin.Int
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import javax.validation.Valid

/**
*
Expand All @@ -20,21 +19,16 @@ import javax.validation.Valid
*/
data class CordaRpcCredentials(

@get:NotNull
@get:Size(min=1,max=65535)
@get:NotNull @get:Size(min=1,max=65535)
@field:JsonProperty("hostname") val hostname: kotlin.String,

@get:NotNull
@get:Min(1)
@get:Max(65535)
@get:NotNull @get:Min(1) @get:Max(65535)
@field:JsonProperty("port") val port: kotlin.Int,

@get:NotNull
@get:Size(min=1,max=1024)
@get:NotNull @get:Size(min=1,max=1024)
@field:JsonProperty("username") val username: kotlin.String,

@get:NotNull
@get:Size(min=1,max=65535)
@get:NotNull @get:Size(min=1,max=65535)
@field:JsonProperty("password") val password: kotlin.String
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import javax.validation.Valid

/**
*
Expand All @@ -24,17 +23,16 @@ import javax.validation.Valid
*/
data class CordaX500Name(

@get:NotNull
@get:NotNull
@field:JsonProperty("organisation") val organisation: kotlin.String,

@get:NotNull
@get:NotNull
@field:JsonProperty("locality") val locality: kotlin.String,

@get:NotNull
@get:NotNull
@field:JsonProperty("country") val country: kotlin.String,

@get:NotNull
@field:Valid
@get:NotNull
@field:JsonProperty("x500Principal") val x500Principal: X500Principal,

@field:JsonProperty("commonName") val commonName: kotlin.String? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import javax.validation.Valid

/**
*
Expand All @@ -24,28 +23,22 @@ import javax.validation.Valid
*/
data class CordappDeploymentConfig(

@get:NotNull
@field:Valid
@get:NotNull
@field:JsonProperty("sshCredentials") val sshCredentials: CordaNodeSshCredentials,

@get:NotNull
@field:Valid
@get:NotNull
@field:JsonProperty("rpcCredentials") val rpcCredentials: CordaRpcCredentials,

@get:NotNull
@get:Size(min=1,max=65535)
@get:NotNull @get:Size(min=1,max=65535)
@field:JsonProperty("cordaNodeStartCmd") val cordaNodeStartCmd: kotlin.String,

@get:NotNull
@get:Size(min=1,max=2048)
@get:NotNull @get:Size(min=1,max=2048)
@field:JsonProperty("cordappDir") val cordappDir: kotlin.String,

@get:NotNull
@get:Size(min=1,max=2048)
@get:NotNull @get:Size(min=1,max=2048)
@field:JsonProperty("cordaJarPath") val cordaJarPath: kotlin.String,

@get:NotNull
@get:Size(min=1,max=2048)
@get:NotNull @get:Size(min=1,max=2048)
@field:JsonProperty("nodeBaseDirPath") val nodeBaseDirPath: kotlin.String
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import javax.validation.Valid

/**
* A CordappInfo describes a single CorDapp currently installed on the node
Expand All @@ -26,32 +25,31 @@ import javax.validation.Valid
*/
data class CordappInfo(

@get:NotNull
@field:Valid
@get:NotNull
@field:JsonProperty("jarHash") val jarHash: SHA256,

@get:NotNull
@get:NotNull
@field:JsonProperty("licence") val licence: kotlin.String,

@get:NotNull
@get:NotNull
@field:JsonProperty("minimumPlatformVersion") val minimumPlatformVersion: kotlin.Int,

@get:NotNull
@get:NotNull
@field:JsonProperty("name") val name: kotlin.String,

@get:NotNull
@get:NotNull
@field:JsonProperty("shortName") val shortName: kotlin.String,

@get:NotNull
@get:NotNull
@field:JsonProperty("targetPlatformVersion") val targetPlatformVersion: kotlin.Int,

@get:NotNull
@get:NotNull
@field:JsonProperty("type") val type: kotlin.String,

@get:NotNull
@get:NotNull
@field:JsonProperty("vendor") val vendor: kotlin.String,

@get:NotNull
@get:NotNull
@field:JsonProperty("version") val version: kotlin.String
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import javax.validation.Valid

/**
*
* @param errors
*/
data class DeployContractJarsBadRequestV1Response(

@get:NotNull
@get:NotNull
@field:JsonProperty("errors") val errors: kotlin.collections.List<kotlin.String>
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import javax.validation.Valid

/**
*
* @param deployedJarFiles
*/
data class DeployContractJarsSuccessV1Response(

@get:NotNull
@get:NotNull
@field:JsonProperty("deployedJarFiles") val deployedJarFiles: kotlin.collections.List<kotlin.String>
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import javax.validation.Valid

/**
*
Expand All @@ -20,13 +19,10 @@ import javax.validation.Valid
*/
data class DeployContractJarsV1Request(

@get:NotNull
@field:Valid
@get:Size(min=0,max=1024)
@get:NotNull @get:Size(min=0,max=1024)
@field:JsonProperty("cordappDeploymentConfigs") val cordappDeploymentConfigs: kotlin.collections.List<CordappDeploymentConfig>,

@get:NotNull
@field:Valid
@get:NotNull
@field:JsonProperty("jarFiles") val jarFiles: kotlin.collections.List<JarFile>
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import javax.validation.Valid

/**
*
* @param nodeIds 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).
*/
data class DiagnoseNodeV1Request(

@get:Size(min=0,max=1024)
@get:Size(min=0,max=1024)
@field:JsonProperty("nodeIds") val nodeIds: kotlin.collections.List<kotlin.String>? = null
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import javax.validation.Valid

/**
*
* @param nodeDiagnosticInfo
*/
data class DiagnoseNodeV1Response(

@get:NotNull
@field:Valid
@get:NotNull
@field:JsonProperty("nodeDiagnosticInfo") val nodeDiagnosticInfo: NodeDiagnosticInfo
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import javax.validation.Valid

/**
* 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import javax.validation.Valid

/**
*
Expand All @@ -22,19 +21,15 @@ import javax.validation.Valid
*/
data class InvokeContractV1Request(

@get:NotNull
@get:Size(min=1,max=1024)
@get:NotNull @get:Size(min=1,max=1024)
@field:JsonProperty("flowFullClassName") val flowFullClassName: kotlin.String,

@get:NotNull
@field:Valid
@get:NotNull
@field:JsonProperty("flowInvocationType") val flowInvocationType: FlowInvocationType,

@get:NotNull
@field:Valid
@get:NotNull
@field:JsonProperty("params") val params: kotlin.collections.List<JvmObject>,

@get:DecimalMin("0")
@get:DecimalMin("0")
@field:JsonProperty("timeoutMs") val timeoutMs: java.math.BigDecimal? = null
) {

Expand Down
Loading

0 comments on commit 34f8e17

Please sign in to comment.