chore: update schema to latest spec

This commit is contained in:
Timo Ley 2023-04-21 20:59:52 +02:00
parent d4b181785f
commit 8411bd1619
3 changed files with 12 additions and 21 deletions

View file

@ -49,7 +49,9 @@ pub struct EnvBuilderResponse {
pub addonscript: AddonScript,
pub files: Vec<File>,
#[serde(skip_serializing_if = "Option::is_none")]
pub launch: Option<LaunchConfig>,
pub launch_client: Option<LaunchConfig>,
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_server: Option<LaunchConfig>,
}
#[derive(Debug, Serialize, Deserialize)]

View file

@ -10,6 +10,8 @@ pub enum Flag {
Incompatible,
Launch,
Env,
Expected,
Library,
}
#[derive(Debug, Deserialize_enum_str, Serialize_enum_str, PartialEq, Eq, Hash)]

View file

@ -29,8 +29,12 @@ pub struct Manifest {
pub repositories: Vec<Repository>,
#[serde(default)]
pub instance: bool,
#[serde(default)]
pub use_builder: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub launch: Option<LaunchConfig>,
pub launch_client: Option<LaunchConfig>,
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_server: Option<LaunchConfig>,
#[serde(skip_serializing_if = "Option::is_none")]
pub meta: Option<Meta>,
}
@ -117,18 +121,6 @@ pub struct Flags {
#[derive(Debug, Serialize, Deserialize)]
pub struct LaunchConfig {
#[serde(default)]
pub libraries: Vec<Library>,
#[serde(skip_serializing_if = "Option::is_none")]
pub java_version: Option<u16>,
#[serde(skip_serializing_if = "Option::is_none")]
pub client: Option<SideConfig>,
#[serde(skip_serializing_if = "Option::is_none")]
pub server: Option<SideConfig>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct SideConfig {
#[serde(skip_serializing_if = "Option::is_none")]
pub main_file: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
@ -137,13 +129,8 @@ pub struct SideConfig {
pub arguments: Vec<String>,
#[serde(default)]
pub jvm_arguments: Vec<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Library {
pub file: String,
#[serde(default)]
pub side: Side,
#[serde(skip_serializing_if = "Option::is_none")]
pub java_version: Option<u16>,
}
impl VersionlessManifest {