From 9e550d11b629026bc40d788edbddea61bbf6d600 Mon Sep 17 00:00:00 2001 From: FiveMovesAhead Date: Mon, 9 Jun 2025 12:21:28 +0100 Subject: [PATCH] Add ChallengeType to get-challenges. --- swagger.yaml | 6 ++++++ tig-structs/src/core.rs | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/swagger.yaml b/swagger.yaml index bd438497..4dca7ed6 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -1045,6 +1045,9 @@ components: properties: name: type: string + type: + type: string + enum: [cpu, gpu] ChallengeId: type: string pattern: ^c[0-9]{3}$ @@ -1210,6 +1213,9 @@ components: type: object additionalProperties: type: string + cpu_arch: + type: string + enum: [amd64, arm64] Player: type: object properties: diff --git a/tig-structs/src/core.rs b/tig-structs/src/core.rs index 890a96e9..d7c26f98 100644 --- a/tig-structs/src/core.rs +++ b/tig-structs/src/core.rs @@ -309,9 +309,16 @@ serializable_struct_with_getters! { } // Challenge child structs +#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize, Deserialize, Hash)] +#[serde(rename_all = "lowercase")] +pub enum ChallengeType { + CPU, + GPU, +} serializable_struct_with_getters! { ChallengeDetails { name: String, + r#type: ChallengeType, } } serializable_struct_with_getters! {