Lexicons, update lexicon repo and compile

Compiles the current lexicons to rust code using esquema. I had to do a
little bit of shenanigans to get the rust to compile that needs to be
redone every time. But there is a better way, I'm just lazy rn.
This commit is contained in:
Julia Lange 2025-05-14 18:18:52 -07:00
parent ec141315d1
commit c0c90c3001
Signed by: Julia
SSH key fingerprint: SHA256:5DJcfxa5/fKCYn57dcabJa2vN2e6eT0pBerYi5SUbto
7 changed files with 34 additions and 19 deletions

View file

@ -9,10 +9,8 @@ pub struct RecordData {
pub overrides: core::option::Option<atrium_api::types::Union<RecordOverridesRefs>>,
///All the data needed to query the content from the source
pub queryable: atrium_api::types::Union<RecordQueryableRefs>,
///An nsid for a specific data source. The domain authority governs how to process the queryable
pub source: atrium_api::types::string::Nsid,
#[serde(skip_serializing_if = "core::option::Option::is_none")]
pub titles: core::option::Option<Vec<crate::my::spoor::content::defs::Title>>,
pub titles: core::option::Option<Vec<crate::lexicons::my::spoor::content::title::Main>>,
}
pub type Record = atrium_api::types::Object<RecordData>;
impl From<atrium_api::types::Unknown> for RecordData {
@ -21,8 +19,18 @@ impl From<atrium_api::types::Unknown> for RecordData {
}
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Tvdbv4Data {
pub id: i64,
pub r#type: String,
}
pub type Tvdbv4 = atrium_api::types::Object<Tvdbv4Data>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum RecordOverridesRefs {}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum RecordQueryableRefs {}
pub enum RecordQueryableRefs {
#[serde(rename = "my.spoor.content.external#tvdbv4")]
Tvdbv4(Box<Tvdbv4>),
}