From a1be603c3ceea748579ad96a1d2b38a2438eec8b Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Fri, 15 Nov 2024 18:19:32 +0200 Subject: [PATCH] feat(cactus-core-api): add Ethereum ledger type Peter's change: Added the missing `ETHEREUM` constant to the leger type that the static consortium plugin has built in to it. This was necessary because adding it only to the core-api broke the build. The two types (since they are duplicates of each other) must be updated in tandem otherwise the code won't compile (which is a good thing because it is an example if when the compiler saves us from mistakes like this that would otherwise stay hidden until much later and only come out as runtime errors) Authored-by: Bruno Mateus Co-authored-by: Peter Somogyvari Signed-off-by: Rafael Belchior Signed-off-by: Peter Somogyvari --- .../src/main/json/openapi.json | 1 + .../src/main/json/openapi.tpl.json | 1 + .../main/kotlin/org/openapitools/client/models/LedgerType.kt | 5 ++++- .../typescript/generated/openapi/typescript-axios/api.ts | 1 + .../src/main/go/generated/openapi/go-client/api/openapi.yaml | 1 + .../main/go/generated/openapi/go-client/model_ledger_type.go | 2 ++ packages/cactus-core-api/src/main/json/openapi.json | 1 + packages/cactus-core-api/src/main/json/openapi.tpl.json | 1 + .../main/kotlin/org/openapitools/client/models/LedgerType.kt | 5 ++++- .../typescript/generated/openapi/typescript-axios/api.ts | 1 + 10 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/cacti-plugin-consortium-static/src/main/json/openapi.json b/packages/cacti-plugin-consortium-static/src/main/json/openapi.json index 1abbbc9342..011357ef77 100644 --- a/packages/cacti-plugin-consortium-static/src/main/json/openapi.json +++ b/packages/cacti-plugin-consortium-static/src/main/json/openapi.json @@ -131,6 +131,7 @@ "BESU_2X", "BURROW_0X", "CORDA_4X", + "ETHEREUM", "FABRIC_2", "SAWTOOTH_1X" ] diff --git a/packages/cacti-plugin-consortium-static/src/main/json/openapi.tpl.json b/packages/cacti-plugin-consortium-static/src/main/json/openapi.tpl.json index 1abbbc9342..011357ef77 100644 --- a/packages/cacti-plugin-consortium-static/src/main/json/openapi.tpl.json +++ b/packages/cacti-plugin-consortium-static/src/main/json/openapi.tpl.json @@ -131,6 +131,7 @@ "BESU_2X", "BURROW_0X", "CORDA_4X", + "ETHEREUM", "FABRIC_2", "SAWTOOTH_1X" ] diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt index 60fe48e4ae..298eb9b78a 100644 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt +++ b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt @@ -22,7 +22,7 @@ import com.squareup.moshi.JsonClass /** * Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation. * - * Values: bESU1X,bESU2X,bURROW0X,cORDA4X,fABRIC2,sAWTOOTH1X + * Values: bESU1X,bESU2X,bURROW0X,cORDA4X,eTHEREUM,fABRIC2,sAWTOOTH1X */ @JsonClass(generateAdapter = false) @@ -40,6 +40,9 @@ enum class LedgerType(val value: kotlin.String) { @Json(name = "CORDA_4X") cORDA4X("CORDA_4X"), + @Json(name = "ETHEREUM") + eTHEREUM("ETHEREUM"), + @Json(name = "FABRIC_2") fABRIC2("FABRIC_2"), diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api.ts index d420a16e30..36bcf76f2c 100644 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -312,6 +312,7 @@ export const LedgerType = { Besu2X: 'BESU_2X', Burrow0X: 'BURROW_0X', Corda4X: 'CORDA_4X', + Ethereum: 'ETHEREUM', Fabric2: 'FABRIC_2', Sawtooth1X: 'SAWTOOTH_1X' } as const; diff --git a/packages/cactus-core-api/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-core-api/src/main/go/generated/openapi/go-client/api/openapi.yaml index 37d70a72de..d435ef83a2 100644 --- a/packages/cactus-core-api/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ b/packages/cactus-core-api/src/main/go/generated/openapi/go-client/api/openapi.yaml @@ -305,6 +305,7 @@ components: - BESU_2X - BURROW_0X - CORDA_4X + - ETHEREUM - FABRIC_2 - SAWTOOTH_1X type: string diff --git a/packages/cactus-core-api/src/main/go/generated/openapi/go-client/model_ledger_type.go b/packages/cactus-core-api/src/main/go/generated/openapi/go-client/model_ledger_type.go index e493a1ec32..0f2fb114d9 100644 --- a/packages/cactus-core-api/src/main/go/generated/openapi/go-client/model_ledger_type.go +++ b/packages/cactus-core-api/src/main/go/generated/openapi/go-client/model_ledger_type.go @@ -24,6 +24,7 @@ const ( BESU_2_X LedgerType = "BESU_2X" BURROW_0_X LedgerType = "BURROW_0X" CORDA_4_X LedgerType = "CORDA_4X" + ETHEREUM LedgerType = "ETHEREUM" FABRIC_2 LedgerType = "FABRIC_2" SAWTOOTH_1_X LedgerType = "SAWTOOTH_1X" ) @@ -34,6 +35,7 @@ var AllowedLedgerTypeEnumValues = []LedgerType{ "BESU_2X", "BURROW_0X", "CORDA_4X", + "ETHEREUM", "FABRIC_2", "SAWTOOTH_1X", } diff --git a/packages/cactus-core-api/src/main/json/openapi.json b/packages/cactus-core-api/src/main/json/openapi.json index f6972c48ec..dada9b9302 100644 --- a/packages/cactus-core-api/src/main/json/openapi.json +++ b/packages/cactus-core-api/src/main/json/openapi.json @@ -186,6 +186,7 @@ "BESU_2X", "BURROW_0X", "CORDA_4X", + "ETHEREUM", "FABRIC_2", "SAWTOOTH_1X" ] diff --git a/packages/cactus-core-api/src/main/json/openapi.tpl.json b/packages/cactus-core-api/src/main/json/openapi.tpl.json index f6972c48ec..dada9b9302 100644 --- a/packages/cactus-core-api/src/main/json/openapi.tpl.json +++ b/packages/cactus-core-api/src/main/json/openapi.tpl.json @@ -186,6 +186,7 @@ "BESU_2X", "BURROW_0X", "CORDA_4X", + "ETHEREUM", "FABRIC_2", "SAWTOOTH_1X" ] diff --git a/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt b/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt index 60fe48e4ae..298eb9b78a 100644 --- a/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt +++ b/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt @@ -22,7 +22,7 @@ import com.squareup.moshi.JsonClass /** * Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation. * - * Values: bESU1X,bESU2X,bURROW0X,cORDA4X,fABRIC2,sAWTOOTH1X + * Values: bESU1X,bESU2X,bURROW0X,cORDA4X,eTHEREUM,fABRIC2,sAWTOOTH1X */ @JsonClass(generateAdapter = false) @@ -40,6 +40,9 @@ enum class LedgerType(val value: kotlin.String) { @Json(name = "CORDA_4X") cORDA4X("CORDA_4X"), + @Json(name = "ETHEREUM") + eTHEREUM("ETHEREUM"), + @Json(name = "FABRIC_2") fABRIC2("FABRIC_2"), diff --git a/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts index fece1ca1f0..770c48d36e 100644 --- a/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -524,6 +524,7 @@ export const LedgerType = { Besu2X: 'BESU_2X', Burrow0X: 'BURROW_0X', Corda4X: 'CORDA_4X', + Ethereum: 'ETHEREUM', Fabric2: 'FABRIC_2', Sawtooth1X: 'SAWTOOTH_1X' } as const;