// `ryuk make:api` registered this route in src/api.rs (above its `// ryuk:api-routes` marker).
use ryuk::api::{ApiAuth, ApiError};
/// Short path: the api group is mounted under `/api`, so this is served as `/api/{{snake}}`.
#[utoipa::path(get, path = "/{{snake}}", security(("api_key" = []), ("oauth2" = ["{{snake}}:read"])),
responses((status = 200, description = "{{Name}} index"), (status = 401, description = "Missing or invalid credential"), (status = 403, description = "Missing scope {{snake}}:read")))]
pub async fn index(ApiAuth(p): ApiAuth) -> Result<axum::Json<serde_json::Value>, ApiError> {
p.require("{{snake}}:read")?;
Ok(axum::Json(serde_json::json!({ "data": [] })))
}