-
Notifications
You must be signed in to change notification settings - Fork 303
Open
Description
How can I change the name of a schema that was generated by a generic type? Currently, I have the following:

#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema, utoipa::ToResponse)]
#[schema(
description = "Base model for HTTP controller responses that contain a data. In case of critical or uncontrolled \
errors, it may be different."
)]
pub struct Response<T>
where
T: Serialize + utoipa::ToSchema,
{
pub code: u16,
pub success: bool,
pub message: String,
pub timestamp: String,
pub data: T,
}
#[derive(Serialize, Deserialize, ToSchema, ToResponse)]
#[schema(title = "User", description = "Basic information about an application user.")]
pub struct UserDto {
pub id: Uuid,
pub username: String,
pub public_name: String,
pub created_at: DateTime<chrono::Utc>,
pub updated_at: DateTime<chrono::Utc>,
}
I want to change the name of the model from Response_UserDto
to ResponseUserDto
or UserResponseDto
or something like that, but I don't know how to do it.
Metadata
Metadata
Assignees
Labels
No labels