Fix Type on nullable types
This commit is contained in:
parent
d2325fe31f
commit
7d3a1c4a66
20
src/api.rs
20
src/api.rs
|
@ -68,26 +68,26 @@ pub struct ModInfo {
|
||||||
pub client_side: String, // TODO serialize as enum
|
pub client_side: String, // TODO serialize as enum
|
||||||
pub server_side: String, // TODO serialize as enum
|
pub server_side: String, // TODO serialize as enum
|
||||||
pub body: String,
|
pub body: String,
|
||||||
pub issues_url: String,
|
pub issues_url: Option<String>,
|
||||||
pub source_url: String,
|
pub source_url: Option<String>,
|
||||||
pub wiki_url: Option<String>,
|
pub wiki_url: Option<String>,
|
||||||
pub discord_url: String,
|
pub discord_url: Option<String>,
|
||||||
pub donation_urls: Vec<DonationLink>,
|
pub donation_urls: Option<Vec<DonationLink>>,
|
||||||
pub project_type: String,
|
pub project_type: String,
|
||||||
pub downloads: isize,
|
pub downloads: isize,
|
||||||
pub icon_url: String,
|
pub icon_url: Option<String>,
|
||||||
pub id: String, // TODO serialize mod id?
|
pub id: String, // TODO serialize mod id?
|
||||||
pub team: String, // TODO serialize team id?
|
pub team: String, // TODO serialize team id?
|
||||||
pub body_url: Option<String>, // NOTE deprecated
|
pub body_url: Option<String>, // NOTE deprecated
|
||||||
pub moderator_message: Option<String>,
|
pub moderator_message: Option<String>,
|
||||||
pub published: String, // TODO serialize as datetime
|
pub published: String, // TODO serialize as datetime
|
||||||
pub updated: String, // TODO serialize as datetime
|
pub updated: String, // TODO serialize as datetime
|
||||||
pub approved: String, // NOTE not listed in OpenAPI docs, TODO serialize as datetime
|
pub approved: Option<String>, // NOTE not listed in OpenAPI docs, TODO serialize as datetime
|
||||||
pub followers: isize,
|
pub followers: isize,
|
||||||
pub status: String,
|
pub status: String,
|
||||||
pub license: License,
|
pub license: License,
|
||||||
pub versions: Vec<String>,
|
pub versions: Vec<String>,
|
||||||
pub gallery: Vec<GalleryEntry>,
|
pub gallery: Option<Vec<GalleryEntry>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Deserialize, Debug)]
|
||||||
|
@ -118,7 +118,7 @@ pub struct ModVersion {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub version_number: String,
|
pub version_number: String,
|
||||||
pub changelog: Option<String>,
|
pub changelog: Option<String>,
|
||||||
// pub dependencies: Vec<String>, // TODO dependency wrangling, thank you modrinth, very cool
|
// pub dependencies: Option<Vec<String>>, // TODO dependency wrangling, thank you modrinth, very cool
|
||||||
pub game_versions: Vec<String>,
|
pub game_versions: Vec<String>,
|
||||||
pub version_type: String, // TODO {alpha | beta | release}
|
pub version_type: String, // TODO {alpha | beta | release}
|
||||||
pub loaders: Vec<String>,
|
pub loaders: Vec<String>,
|
||||||
|
|
Loading…
Reference in New Issue