liboxen 0.53.0

Oxen is a fast data version control system, built with machine learning training data in mind. Designed to handle terabytes of data with ease, using a workflow similar to git. Version both structured and unstructured data of any modality: text, images, video, audio, CSV, Parquet, JSONL, model checkpoints, and more. liboxen is the embeddable core library behind the oxen CLI and server, which power fine tuning and inference pipelines for multimodal LLMs, image models, and video models on Oxen.ai.
use crate::model::Namespace;
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

use super::StatusMessage;

#[derive(Serialize, Deserialize, Debug, ToSchema)]
pub struct NamespaceView {
    pub namespace: String,
}

#[derive(Serialize, Deserialize, Debug, ToSchema)]
#[schema(
    example = json!({
    "status": "success",
    "status_message": "resource_found",
    "namespaces": [
        { "name": "my_namespace" },
        { "name": "oxen" }
    ],
}))]
pub struct ListNamespacesResponse {
    #[serde(flatten)]
    #[schema(
        value_type = StatusMessage,
        example = json!({
            "status": "success",
            "status_message": "resource_found"
        })
    )]
    pub status: StatusMessage,
    pub namespaces: Vec<NamespaceView>,
}

#[derive(Serialize, Deserialize, Debug, ToSchema)]
pub struct NamespaceResponse {
    #[serde(flatten)]
    pub status: StatusMessage,
    pub namespace: Namespace,
}