Commit 9cee84be authored by Emmanuel Raviart's avatar Emmanuel Raviart

In `InfosReunionsInternationale`, field `listePays` is no more always empty....

In `InfosReunionsInternationale`, field `listePays` is no more always empty. In `Reunion` field `lieu` may be missing.
parent 84c2e13b
Pipeline #96868 failed with stage
in 3 minutes and 7 seconds
use chrono::{DateTime, FixedOffset};
use acteurs::Acteur;
use commun::{CycleDeVie, EmptyChoice, Ident, Uid, XmlNamespace};
use commun::{CycleDeVie, EmptyChoice, Ident, ListePays, Uid, XmlNamespace};
use contexts::Context;
use organes::Organe;
use points_odj::PointsOdj;
......@@ -101,7 +101,7 @@ pub struct InfosReunionsInternationale {
#[serde(rename = "informationsComplementaires")]
pub informations_complementaires: Option<EmptyChoice>,
#[serde(rename = "listePays")]
pub liste_pays: Option<EmptyChoice>,
pub liste_pays: Option<ListePays>,
}
#[derive(Clone, Debug, Deserialize, GraphQLObject)]
......@@ -160,6 +160,13 @@ pub struct ParticipantsInternes {
pub participants_internes: Vec<ParticipantInterne>,
}
#[derive(Clone, Debug, Deserialize, GraphQLObject)]
#[serde(deny_unknown_fields)]
pub struct PaysReunion {
#[serde(rename = "paysRef")]
pub pays_ref: String,
}
#[derive(Debug, Deserialize, GraphQLObject)]
#[serde(deny_unknown_fields)]
pub struct PersonneAuditionnee {
......@@ -195,7 +202,7 @@ pub struct Reunion {
pub identifiants: Option<Identifiants>,
#[serde(rename = "infosReunionsInternationale")]
pub infos_reunions_internationale: Option<InfosReunionsInternationale>,
pub lieu: LieuReunion,
pub lieu: Option<LieuReunion>,
#[serde(rename = "ODJ")]
pub odj: Option<Odj>,
#[serde(rename = "organeReuniRef")]
......@@ -256,7 +263,7 @@ graphql_object!(Reunion: Context |&self| {
&self.infos_reunions_internationale
}
field lieu() -> &LieuReunion {
field lieu() -> &Option<LieuReunion> {
&self.lieu
}
......
......@@ -80,6 +80,13 @@ pub struct InfoJo {
pub reference_nor: Option<String>,
}
#[derive(Clone, Debug, Deserialize, GraphQLObject)]
#[serde(deny_unknown_fields)]
pub struct ListePays {
#[serde(rename = "paysRef")]
pub pays_ref: String,
}
#[derive(Clone, Debug, Deserialize, GraphQLObject)]
#[serde(deny_unknown_fields)]
pub struct Rapporteur {
......
use commun::EmptyChoice;
use commun::{EmptyChoice, ListePays};
use types_organes::CodeTypeOrgane;
#[derive(Clone, Debug, Deserialize, GraphQLObject)]
......@@ -26,13 +26,6 @@ pub struct GroupePolitique {
pub vimode: Vimode,
}
#[derive(Clone, Debug, Deserialize, GraphQLObject)]
#[serde(deny_unknown_fields)]
pub struct ListePays {
#[serde(rename = "paysRef")]
pub pays_ref: String,
}
#[derive(Clone, Debug, Deserialize)]
#[serde(tag = "@xsi:type")]
pub enum Organe {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment