diff options
Diffstat (limited to 'src/database/artist.rs')
-rw-r--r-- | src/database/artist.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/database/artist.rs b/src/database/artist.rs index 1d4e1cd..0bdc7c1 100644 --- a/src/database/artist.rs +++ b/src/database/artist.rs @@ -5,20 +5,23 @@ use utoipa::ToSchema; #[derive(Serialize, ToSchema)] pub struct Artist { - #[schema(example = "Attempt", required = true)] + #[schema(example = "artist name")] name: Option<String>, - #[schema(example = 3, required = true)] + #[schema(example = "1")] id: Option<i32>, } -#[derive(Serialize, Deserialize)] +#[derive(Serialize, Deserialize, ToSchema)] pub struct ArtistPost { + #[schema(example = "artist name", required = true)] name: Option<String>, } -#[derive(Serialize, Deserialize)] +#[derive(Serialize, Deserialize, ToSchema)] pub struct ArtistPut { + #[schema(example = "1", required = true)] id: Option<String>, + #[schema(example = "new name", required = true)] name: Option<String>, } |