use canapi::Endpoint; #[derive(Default, Serialize, Deserialize)] pub struct PostEndpoint { pub id: Option, pub title: Option, pub subtitle: Option, pub content: Option } api!("/api/v1/posts" => PostEndpoint);