forked from Plugin-JF-Onkostar/osc-variant
Check input file for additional entries
This will prevent the application from creating output without these additional entities, which would be missing in output. Instead, the application will exit with an error message.
This commit is contained in:
@@ -28,6 +28,7 @@ use crate::model::Ordner;
|
||||
use crate::model::{Ansichten, Entries, Filter, MenuCategory, PlausibilityRules, Script};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct DataForm {
|
||||
#[serde(rename = "DataCatalogues")]
|
||||
data_catalogues: DataCatalogues,
|
||||
@@ -162,12 +163,14 @@ impl DataForm {
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct DataCatalogues {
|
||||
#[serde(rename = "DataCatalogue")]
|
||||
data_catalogue: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct Entry {
|
||||
#[serde(rename = "@parentId")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@@ -354,6 +357,7 @@ pub struct Entry {
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct DataFormEntries {
|
||||
#[serde(rename = "EntryName")]
|
||||
entry_name: Option<Vec<String>>,
|
||||
|
||||
Reference in New Issue
Block a user