feat: rename fields in ApiKeyResponse and ThoughtSchema for consistency with API specifications
This commit is contained in:
@@ -17,7 +17,7 @@ pub struct ApiKeyResponse {
|
|||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub key: ApiKeySchema,
|
pub key: ApiKeySchema,
|
||||||
/// The full plaintext API key. This is only returned on creation.
|
/// The full plaintext API key. This is only returned on creation.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none", rename = "plaintextKey")]
|
||||||
pub plaintext_key: Option<String>,
|
pub plaintext_key: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -12,11 +12,14 @@ use uuid::Uuid;
|
|||||||
pub struct ThoughtSchema {
|
pub struct ThoughtSchema {
|
||||||
pub id: Uuid,
|
pub id: Uuid,
|
||||||
#[schema(example = "frutiger")]
|
#[schema(example = "frutiger")]
|
||||||
|
#[serde(rename = "authorUsername")]
|
||||||
pub author_username: String,
|
pub author_username: String,
|
||||||
#[schema(example = "This is my first thought! #welcome")]
|
#[schema(example = "This is my first thought! #welcome")]
|
||||||
pub content: String,
|
pub content: String,
|
||||||
pub visibility: Visibility,
|
pub visibility: Visibility,
|
||||||
|
#[serde(rename = "replyToId")]
|
||||||
pub reply_to_id: Option<Uuid>,
|
pub reply_to_id: Option<Uuid>,
|
||||||
|
#[serde(rename = "createdAt")]
|
||||||
pub created_at: DateTimeWithTimeZoneWrapper,
|
pub created_at: DateTimeWithTimeZoneWrapper,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user