Skip to content

Commit 73e27cf

Browse files
committed
feature(openAPI): add missing CardanoTransactions to signed entity of root route, improve test with missing signed entity types
1 parent 16fa0cb commit 73e27cf

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

mithril-aggregator/src/http_server/routes/root_routes.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ mod tests {
125125
SignedEntityTypeDiscriminants::CardanoStakeDistribution,
126126
SignedEntityTypeDiscriminants::CardanoImmutableFilesFull,
127127
SignedEntityTypeDiscriminants::MithrilStakeDistribution,
128+
SignedEntityTypeDiscriminants::CardanoTransactions,
129+
SignedEntityTypeDiscriminants::CardanoDatabase,
128130
]),
131+
cardano_transactions_prover_max_hashes_allowed_by_request: 500,
129132
..RouterConfig::dummy()
130133
};
131134
let dependency_manager = initialize_dependencies!().await;
@@ -161,9 +164,13 @@ mod tests {
161164
SignedEntityTypeDiscriminants::CardanoStakeDistribution,
162165
SignedEntityTypeDiscriminants::CardanoImmutableFilesFull,
163166
SignedEntityTypeDiscriminants::MithrilStakeDistribution,
167+
SignedEntityTypeDiscriminants::CardanoTransactions,
168+
SignedEntityTypeDiscriminants::CardanoDatabase,
164169
]),
165170
aggregate_signature_type: AggregateSignatureType::Concatenation,
166-
cardano_transactions_prover: None,
171+
cardano_transactions_prover: Some(CardanoTransactionsProverCapabilities {
172+
max_hashes_allowed_by_request: 500
173+
}),
167174
},
168175
}
169176
);

openapi.yaml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -919,13 +919,8 @@ components:
919919
type: array
920920
minItems: 1
921921
items:
922-
description: Signed entity types that can be signed
923-
type: string
924-
enum:
925-
- MithrilStakeDistribution
926-
- CardanoStakeDistribution
927-
- CardanoImmutableFilesFull
928-
- CardanoTransactions
922+
$ref: "#/components/schemas/SignedEntityTypes"
923+
929924
aggregate_signature_type:
930925
description: Aggregate signature type used by the aggregator to create certificates
931926
type: string
@@ -982,6 +977,16 @@ components:
982977
- "latest"
983978
- "latest-5"
984979

980+
SignedEntityTypes:
981+
description: Signed entity types that can be signed
982+
type: string
983+
enum:
984+
- MithrilStakeDistribution
985+
- CardanoStakeDistribution
986+
- CardanoImmutableFilesFull
987+
- CardanoTransactions
988+
- CardanoDatabase
989+
985990
EpochSettingsMessage:
986991
description: Epoch settings
987992
type: object
@@ -1066,14 +1071,7 @@ components:
10661071
type: array
10671072
minItems: 1
10681073
items:
1069-
description: Signed entity types that can be signed
1070-
type: string
1071-
enum:
1072-
- MithrilStakeDistribution
1073-
- CardanoStakeDistribution
1074-
- CardanoImmutableFilesFull
1075-
- CardanoTransactions
1076-
- CardanoDatabase
1074+
$ref: "#/components/schemas/SignedEntityTypes"
10771075
examples:
10781076
- {
10791077
"protocol_parameters": { "k": 9, "m": 77, "phi_f": 0.5 },

0 commit comments

Comments
 (0)