Files
modrinth/apps/labrinth/src/models/error.rs
T
François-Xavier Talbotandaecsocket 4a6fa9fc3d feat: better api docs (#6586)
* 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>
2026-07-04 14:19:21 +00:00

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>,
}