diff --git a/common/src/api/external/mod.rs b/common/src/api/external/mod.rs index 1f9268400f..b5e3ad3d92 100644 --- a/common/src/api/external/mod.rs +++ b/common/src/api/external/mod.rs @@ -1301,7 +1301,12 @@ pub enum AffinityGroupMember { /// /// Instances can belong to up to 16 affinity groups. // See: INSTANCE_MAX_AFFINITY_GROUPS - Instance { id: InstanceUuid, name: Name, run_state: InstanceState }, + Instance { + #[schemars(with = "Uuid")] + id: InstanceUuid, + name: Name, + run_state: InstanceState, + }, } impl SimpleIdentityOrName for AffinityGroupMember { @@ -1332,7 +1337,12 @@ pub enum AntiAffinityGroupMember { /// /// Instances can belong to up to 16 anti-affinity groups. // See: INSTANCE_MAX_ANTI_AFFINITY_GROUPS - Instance { id: InstanceUuid, name: Name, run_state: InstanceState }, + Instance { + #[schemars(with = "Uuid")] + id: InstanceUuid, + name: Name, + run_state: InstanceState, + }, } impl SimpleIdentityOrName for AntiAffinityGroupMember { diff --git a/dev-tools/omdb/src/bin/omdb/nexus.rs b/dev-tools/omdb/src/bin/omdb/nexus.rs index 9fdc54a920..d4bd569b60 100644 --- a/dev-tools/omdb/src/bin/omdb/nexus.rs +++ b/dev-tools/omdb/src/bin/omdb/nexus.rs @@ -4072,7 +4072,7 @@ async fn cmd_nexus_support_bundles_list( user_comment: String, } let rows = support_bundles.into_iter().map(|sb| SupportBundleInfo { - id: *sb.id, + id: sb.id, time_created: sb.time_created, reason_for_creation: sb.reason_for_creation, reason_for_failure: sb diff --git a/nexus/types/src/external_api/shared.rs b/nexus/types/src/external_api/shared.rs index 10f38bf7df..58088a9e07 100644 --- a/nexus/types/src/external_api/shared.rs +++ b/nexus/types/src/external_api/shared.rs @@ -642,6 +642,7 @@ pub enum SupportBundleState { #[derive(Debug, Clone, JsonSchema, Serialize, Deserialize)] pub struct SupportBundleInfo { + #[schemars(with = "Uuid")] pub id: SupportBundleUuid, pub time_created: DateTime, pub reason_for_creation: String, diff --git a/nexus/types/src/external_api/views.rs b/nexus/types/src/external_api/views.rs index d6a81606b2..b406c9299f 100644 --- a/nexus/types/src/external_api/views.rs +++ b/nexus/types/src/external_api/views.rs @@ -1308,12 +1308,14 @@ pub struct AlertDelivery { pub id: Uuid, /// The UUID of the alert receiver that this event was delivered to. + #[schemars(with = "Uuid")] pub receiver_id: AlertReceiverUuid, /// The event class. pub alert_class: String, /// The UUID of the event. + #[schemars(with = "Uuid")] pub alert_id: AlertUuid, /// The state of this delivery. diff --git a/openapi/nexus-internal.json b/openapi/nexus-internal.json index 6915ad92c2..82331b8563 100644 --- a/openapi/nexus-internal.json +++ b/openapi/nexus-internal.json @@ -8573,7 +8573,8 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForSupportBundleKind" + "type": "string", + "format": "uuid" }, "reason_for_creation": { "type": "string" @@ -8843,10 +8844,6 @@ "type": "string", "format": "uuid" }, - "TypedUuidForSupportBundleKind": { - "type": "string", - "format": "uuid" - }, "TypedUuidForUpstairsRepairKind": { "type": "string", "format": "uuid" diff --git a/openapi/nexus.json b/openapi/nexus.json index 922efaf026..28fd4f87a7 100644 --- a/openapi/nexus.json +++ b/openapi/nexus.json @@ -13826,7 +13826,8 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForInstanceKind" + "type": "string", + "format": "uuid" }, "name": { "$ref": "#/components/schemas/Name" @@ -13993,11 +13994,8 @@ }, "alert_id": { "description": "The UUID of the event.", - "allOf": [ - { - "$ref": "#/components/schemas/TypedUuidForAlertKind" - } - ] + "type": "string", + "format": "uuid" }, "attempts": { "description": "Individual attempts to deliver this webhook event, and their outcomes.", @@ -14014,11 +14012,8 @@ }, "receiver_id": { "description": "The UUID of the alert receiver that this event was delivered to.", - "allOf": [ - { - "$ref": "#/components/schemas/TypedUuidForAlertReceiverKind" - } - ] + "type": "string", + "format": "uuid" }, "state": { "description": "The state of this delivery.", @@ -14514,7 +14509,8 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForInstanceKind" + "type": "string", + "format": "uuid" }, "name": { "$ref": "#/components/schemas/Name" @@ -24585,7 +24581,8 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/TypedUuidForSupportBundleKind" + "type": "string", + "format": "uuid" }, "reason_for_creation": { "type": "string" @@ -25995,22 +25992,6 @@ } } }, - "TypedUuidForAlertKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForAlertReceiverKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForInstanceKind": { - "type": "string", - "format": "uuid" - }, - "TypedUuidForSupportBundleKind": { - "type": "string", - "format": "uuid" - }, "UninitializedSled": { "description": "A sled that has not been added to an initialized rack yet", "type": "object",