mirror of
https://github.com/modrinth/code.git
synced 2026-08-31 03:55:59 +00:00
* feat: docs * fix tombi * chore: fix some of the routes rendering with missing / * response schemas * fix: restore labrinth docs routes * Fix path parameter docs in routes * remove utoipa-actix-web * consistency * improve version intros * improve formatting, examples * better hash examples, move openapi stuff to openapi.rs * more utoipa param fixes * request body docs * chore: remove moderation route from v2, remove ingest & webhooks from v3 spec * fixes * chore: tweak sources titles * fix * fix test * improve examples * increase compiler spawned thread stack size * remove unused tests & script * test * bro what * fix --------- Co-authored-by: aecsocket <43144841+aecsocket@users.noreply.github.com>
13 lines
400 B
Rust
13 lines
400 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
/// An error returned by the API
|
|
#[derive(Serialize, Deserialize, utoipa::ToSchema)]
|
|
pub struct ApiError<'a> {
|
|
#[schema(value_type = String)]
|
|
pub error: &'a str,
|
|
pub description: String,
|
|
#[schema(value_type = Option<serde_json::Value>)]
|
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
|
pub details: Option<serde_json::Value>,
|
|
}
|