diff options
author | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2025-01-26 19:11:24 +0100 |
---|---|---|
committer | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2025-01-26 19:11:24 +0100 |
commit | c622eab39ac7dd9f794b5d60eb937e29c9b3bd6e (patch) | |
tree | a75067a661250a4ed74096929083948f65c01fdb /src/database/artist.rs | |
parent | 5891af7e8c1411029fe1ad9c6d3182f88bcf3dfd (diff) |
add api documentation
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>, } |