Add OpenAPI docs

This commit is contained in:
Andras Schmelczer 2024-12-08 15:15:10 +00:00
parent 53f1a3dcc6
commit d5a5367e1e
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
5 changed files with 51 additions and 20 deletions

View file

@ -1,12 +1,13 @@
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use schemars::JsonSchema;
use serde::Serialize;
use sync_lib::bytes_to_base64;
pub type VaultId = String;
pub type DocumentId = uuid::Uuid;
pub type DocumentVersionId = i64;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone)]
pub struct StoredDocumentVersion {
pub vault_id: VaultId,
pub document_id: DocumentId,
@ -25,7 +26,7 @@ impl StoredDocumentVersion {
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, JsonSchema)]
pub struct DocumentVersionWithoutContent {
pub vault_id: VaultId,
pub document_id: DocumentId,
@ -52,7 +53,7 @@ impl From<StoredDocumentVersion> for DocumentVersionWithoutContent {
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, JsonSchema)]
pub struct DocumentVersion {
pub vault_id: VaultId,
pub document_id: DocumentId,