Add swagger for validator-api (#1239)

* validator-api: add swagger openapi

* Lock file
This commit is contained in:
Jon Häggblad
2022-05-03 12:25:53 +02:00
committed by durch
parent b8ce97e005
commit c77ccddcb3
11 changed files with 143 additions and 22 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ use mixnet_contract_common::reward_params::EpochRewardParams;
use mixnet_contract_common::{
GatewayBond, IdentityKey, IdentityKeyRef, Interval, MixNodeBond, RewardedSetNodeStatus,
};
use rocket_okapi::openapi_get_routes;
use rocket::fairing::AdHoc;
use serde::Serialize;
@@ -191,7 +192,7 @@ impl ValidatorCache {
rocket.manage(Self::new()).mount(
// this format! is so ugly...
format!("/{}", VALIDATOR_API_VERSION),
routes![
openapi_get_routes![
routes::get_mixnodes,
routes::get_gateways,
routes::get_active_set,