Autogenerate only the models of the API for the backend-server

This commit is contained in:
2025-05-30 22:26:18 +02:00
parent 597a960bf1
commit 6950ac62e8
9 changed files with 95 additions and 289 deletions

View File

@@ -13,7 +13,6 @@ pub struct ApiError {
}
impl Display for ApiError {
// This trait requires `fmt` with this exact signature.
fn fmt(&self, f: &mut Formatter) -> Result {
write!(f, "{}", self.message)
}
@@ -81,3 +80,12 @@ impl From<chrono::ParseError> for ApiError {
}
}
}
impl From<uuid::Error> for ApiError {
fn from(value: uuid::Error) -> Self {
ApiError {
status: 422,
message: value.to_string()
}
}
}