Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,6 @@ pub(crate) struct UserView {
|
||||
/// Desired visibility for a publish/unpublish request.
|
||||
#[derive(Deserialize, ToSchema)]
|
||||
pub(crate) struct VisibilityRequest {
|
||||
#[schema(value_type = String)]
|
||||
pub visibility: Visibility,
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ use crate::{
|
||||
#[derive(Serialize, ToSchema)]
|
||||
pub(crate) struct AuthorityView {
|
||||
pub id: String,
|
||||
#[schema(value_type = domain::AuthorityKind)]
|
||||
pub kind: String,
|
||||
pub external_uri: Option<String>,
|
||||
pub labels: Vec<LabelView>,
|
||||
|
||||
@@ -40,9 +40,10 @@ pub(crate) struct AdminObjectView {
|
||||
/// `YYYY-MM-DD` or null.
|
||||
pub recording_date: Option<String>,
|
||||
/// "draft" | "internal" | "public".
|
||||
#[schema(value_type = domain::Visibility)]
|
||||
pub visibility: String,
|
||||
/// Flexible field values (key -> value).
|
||||
#[schema(value_type = Object)]
|
||||
#[schema(value_type = std::collections::HashMap<String, serde_json::Value>)]
|
||||
pub fields: serde_json::Value,
|
||||
}
|
||||
|
||||
@@ -162,7 +163,6 @@ pub(crate) struct ObjectCreateRequest {
|
||||
pub recorder: Option<String>,
|
||||
pub recording_date: Option<String>,
|
||||
/// "draft" | "internal" (public is rejected — publish via the visibility endpoint).
|
||||
#[schema(value_type = String)]
|
||||
pub visibility: Visibility,
|
||||
}
|
||||
|
||||
@@ -360,8 +360,10 @@ pub(crate) async fn delete_object(
|
||||
pub(crate) struct FieldDefinitionView {
|
||||
pub key: String,
|
||||
/// "text" | "localized_text" | "integer" | "date" | "boolean" | "term" | "authority".
|
||||
#[schema(value_type = domain::DataType)]
|
||||
pub data_type: String,
|
||||
pub vocabulary_id: Option<String>,
|
||||
#[schema(value_type = Option<domain::AuthorityKind>)]
|
||||
pub authority_kind: Option<String>,
|
||||
pub required: bool,
|
||||
pub group: Option<String>,
|
||||
|
||||
@@ -59,7 +59,10 @@ use crate::{
|
||||
admin_search::SearchHitView,
|
||||
admin_search::SearchResultsView,
|
||||
admin_authorities::AuthorityView,
|
||||
admin_authorities::NewAuthorityRequest
|
||||
admin_authorities::NewAuthorityRequest,
|
||||
domain::Visibility,
|
||||
domain::AuthorityKind,
|
||||
domain::DataType
|
||||
)),
|
||||
info(title = "Collection Management System", version = "0.0.0")
|
||||
)]
|
||||
|
||||
Reference in New Issue
Block a user