mirror of
https://github.com/n08i40k/schedule-parser-rusted.git
synced 2025-12-06 17:57:47 +03:00
Обновление документации.
This commit is contained in:
@@ -54,7 +54,7 @@ mod schema {
|
||||
#[derive(Serialize, Deserialize, ToSchema)]
|
||||
#[schema(as = ChangeGroup::Request)]
|
||||
pub struct Request {
|
||||
/// Название группы.
|
||||
/// Group name.
|
||||
pub group: String,
|
||||
}
|
||||
|
||||
@@ -63,21 +63,21 @@ mod schema {
|
||||
#[schema(as = ChangeGroup::ErrorCode)]
|
||||
#[status_code = "actix_web::http::StatusCode::CONFLICT"]
|
||||
pub enum ErrorCode {
|
||||
/// Расписания ещё не получены.
|
||||
/// Schedules have not yet been received.
|
||||
#[display("Schedule not parsed yet.")]
|
||||
#[status_code = "actix_web::http::StatusCode::SERVICE_UNAVAILABLE"]
|
||||
NoSchedule,
|
||||
|
||||
/// Передано то же название группы, что есть на данный момент.
|
||||
/// Passed the same group name that is currently there.
|
||||
#[display("Passed the same group name as it is at the moment.")]
|
||||
SameGroup,
|
||||
|
||||
/// Требуемая группа не существует.
|
||||
/// The required group does not exist.
|
||||
#[display("The required group does not exist.")]
|
||||
#[status_code = "actix_web::http::StatusCode::NOT_FOUND"]
|
||||
NotFound,
|
||||
|
||||
/// Ошибка на стороне сервера.
|
||||
/// Server-side error.
|
||||
#[display("Internal server error.")]
|
||||
#[status_code = "actix_web::http::StatusCode::INTERNAL_SERVER_ERROR"]
|
||||
InternalServerError,
|
||||
|
||||
@@ -45,7 +45,7 @@ mod schema {
|
||||
#[derive(Serialize, Deserialize, ToSchema)]
|
||||
#[schema(as = ChangeUsername::Request)]
|
||||
pub struct Request {
|
||||
/// Новое имя.
|
||||
/// User name.
|
||||
pub username: String,
|
||||
}
|
||||
|
||||
@@ -54,15 +54,15 @@ mod schema {
|
||||
#[schema(as = ChangeUsername::ErrorCode)]
|
||||
#[status_code = "actix_web::http::StatusCode::CONFLICT"]
|
||||
pub enum ErrorCode {
|
||||
/// Передано то же имя, что есть на данный момент.
|
||||
/// The same name that is currently present is passed.
|
||||
#[display("Passed the same name as it is at the moment.")]
|
||||
SameUsername,
|
||||
|
||||
/// Пользователь с таким именем уже существует.
|
||||
/// A user with this name already exists.
|
||||
#[display("A user with this name already exists.")]
|
||||
AlreadyExists,
|
||||
|
||||
/// Ошибка на стороне сервера.
|
||||
/// Server-side error.
|
||||
#[display("Internal server error.")]
|
||||
#[status_code = "actix_web::http::StatusCode::INTERNAL_SERVER_ERROR"]
|
||||
InternalServerError,
|
||||
|
||||
Reference in New Issue
Block a user