diff --git a/auction-server/src/api/liquidation.rs b/auction-server/src/api/liquidation.rs index dbaa431a..e0233565 100644 --- a/auction-server/src/api/liquidation.rs +++ b/auction-server/src/api/liquidation.rs @@ -65,10 +65,12 @@ pub struct OpportunityParamsWithMetadata { #[schema(example = "f47ac10b-58cc-4372-a567-0e02b2c3d479", value_type=String)] opportunity_id: Uuid, /// Creation time of the opportunity - #[schema(example = "1700000000")] + #[schema(example = 1700000000, value_type=i64)] creation_time: UnixTimestamp, /// opportunity data #[serde(flatten)] + // expands params into component fields in the generated client schemas + #[schema(inline)] params: OpportunityParams, } @@ -237,7 +239,7 @@ pub struct OpportunityBid { /// Bid on liquidation opportunity #[utoipa::path(post, path = "/v1/liquidation/opportunities/{opportunity_id}/bids", request_body=OpportunityBid, - params(("opportunity_id", description = "Opportunity id to bid on")), responses( + params(("opportunity_id"=String, description = "Opportunity id to bid on")), responses( (status = 200, description = "Bid Result", body = BidResult, example = json!({"status": "OK"})), (status = 400, response = ErrorBodyResponse), (status = 404, description = "Opportunity or chain id was not found", body = ErrorBodyResponse), diff --git a/auction-server/src/api/ws.rs b/auction-server/src/api/ws.rs index 02e8d8df..4ede0f6d 100644 --- a/auction-server/src/api/ws.rs +++ b/auction-server/src/api/ws.rs @@ -60,9 +60,15 @@ pub struct WsState { #[serde(tag = "method", content = "params")] pub enum ClientMessage { #[serde(rename = "subscribe")] - Subscribe { chain_ids: Vec }, + Subscribe { + #[schema(value_type = Vec)] + chain_ids: Vec, + }, #[serde(rename = "unsubscribe")] - Unsubscribe { chain_ids: Vec }, + Unsubscribe { + #[schema(value_type = Vec)] + chain_ids: Vec, + }, } #[derive(Deserialize, Debug, Clone, ToSchema)]