From 2cce59ea235aaa8da1101580ed0ae424ce0f71c9 Mon Sep 17 00:00:00 2001 From: Jonathan Casey Date: Thu, 9 Nov 2023 15:23:39 +0000 Subject: [PATCH] test(*): update snapshot Signed-off-by: Jonathan Casey --- test/codegen/__snapshots__/codegen.js.snap | 620 +++++++++++++-------- 1 file changed, 380 insertions(+), 240 deletions(-) diff --git a/test/codegen/__snapshots__/codegen.js.snap b/test/codegen/__snapshots__/codegen.js.snap index 66c07675..cc7052d8 100644 --- a/test/codegen/__snapshots__/codegen.js.snap +++ b/test/codegen/__snapshots__/codegen.js.snap @@ -6,7 +6,7 @@ exports[`codegen #formats check we can convert all formats from namespace unvers "value": "@namespace("concerto@1.0.0") protocol MyProtocol { - + record Concept { } @@ -39,7 +39,7 @@ exports[`codegen #formats check we can convert all formats from namespace unvers "value": "@namespace("concerto") protocol MyProtocol { - + record Concept { } @@ -69,7 +69,7 @@ exports[`codegen #formats check we can convert all formats from namespace unvers protocol MyProtocol { import idl "concerto@1.0.0.avdl"; - + enum State { MA, NY, @@ -106,7 +106,7 @@ protocol MyProtocol { import idl "org.acme.hr.base.avdl"; import idl "concerto@1.0.0.avdl"; - + record Company { string name; Address headquarters; @@ -494,7 +494,7 @@ exports[`codegen #formats check we can convert all formats from namespace unvers "value": "// Package concerto_1_0_0 contains domain objects and was generated from Concerto namespace concerto@1.0.0. package concerto_1_0_0 import "time" - + type Concept struct { } type Asset struct { @@ -522,7 +522,7 @@ exports[`codegen #formats check we can convert all formats from namespace unvers "key": "concerto.go", "value": "// Package concerto contains domain objects and was generated from Concerto namespace concerto. package concerto - + type Concept struct { } type Asset struct { @@ -549,7 +549,7 @@ exports[`codegen #formats check we can convert all formats from namespace unvers "value": "// Package org_acme_hr_base contains domain objects and was generated from Concerto namespace org.acme.hr.base. package org_acme_hr_base import "concerto_1_0_0"; - + type State int const ( MA State = 1 + iota @@ -585,7 +585,7 @@ package org_acme_hr import "time" import "org_acme_hr_base"; import "concerto_1_0_0"; - + type Company struct { concerto_1_0_0.Concept Name string \`json:"name"\` @@ -870,7 +870,7 @@ public abstract class Asset extends Concept { public void set$id(String i) { $id = i; } - + // the accessor for the identifying field public String getID() { return this.get$identifier(); @@ -909,7 +909,7 @@ public abstract class Participant extends Concept { public void set$id(String i) { $id = i; } - + // the accessor for the identifying field public String getID() { return this.get$identifier(); @@ -1166,7 +1166,7 @@ import com.fasterxml.jackson.annotation.*; @JsonIgnoreProperties({"id"}) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "serialNumber") public abstract class Equipment extends Asset { - + // the accessor for the identifying field public String getID() { return this.getSerialNumber(); @@ -1221,7 +1221,7 @@ import com.fasterxml.jackson.annotation.*; @JsonIgnoreProperties({"id"}) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "serialNumber") public class Laptop extends Equipment { - + // the accessor for the identifying field public String getID() { return this.getSerialNumber(); @@ -1262,7 +1262,7 @@ import com.fasterxml.jackson.annotation.*; @JsonIgnoreProperties({"id"}) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "email") public abstract class Person extends Participant { - + // the accessor for the identifying field public String getID() { return this.getEmail(); @@ -1357,7 +1357,7 @@ import com.fasterxml.jackson.annotation.*; @JsonIgnoreProperties({"id"}) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "email") public class Employee extends Person { - + // the accessor for the identifying field public String getID() { return this.getEmail(); @@ -1445,7 +1445,7 @@ import com.fasterxml.jackson.annotation.*; @JsonIgnoreProperties({"id"}) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "email") public class Contractor extends Person { - + // the accessor for the identifying field public String getID() { return this.getEmail(); @@ -1491,7 +1491,7 @@ import com.fasterxml.jackson.annotation.*; @JsonIgnoreProperties({"id"}) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "email") public class Manager extends Employee { - + // the accessor for the identifying field public String getID() { return this.getEmail(); @@ -3830,7 +3830,7 @@ exports[`codegen #formats check we can convert all formats from namespace unvers "key": "utils.rs", "value": "use chrono::{ DateTime, TimeZone, Utc }; use serde::{ Deserialize, Serialize, Deserializer, Serializer }; - + pub fn serialize_datetime_option(datetime: &Option>, serializer: S) -> Result where S: Serializer, @@ -3860,7 +3860,7 @@ where let datetime_str = String::deserialize(deserializer)?; Utc.datetime_from_str(&datetime_str, "%Y-%m-%dT%H:%M:%S%.3f%Z").map_err(serde::de::Error::custom) } - + pub fn serialize_datetime(datetime: &chrono::DateTime, serializer: S) -> Result where S: Serializer, @@ -3877,9 +3877,9 @@ exports[`codegen #formats check we can convert all formats from namespace unvers "key": "concerto_1_0_0.rs", "value": "use serde::{ Deserialize, Serialize }; use chrono::{ DateTime, TimeZone, Utc }; - + use crate::utils::*; - + #[derive(Debug, Serialize, Deserialize)] pub struct Concept { #[serde( @@ -3894,7 +3894,7 @@ pub struct Asset { rename = "$class", )] pub _class: String, - + #[serde( rename = "$identifier", )] @@ -3907,7 +3907,7 @@ pub struct Participant { rename = "$class", )] pub _class: String, - + #[serde( rename = "$identifier", )] @@ -3920,7 +3920,7 @@ pub struct Transaction { rename = "$class", )] pub _class: String, - + #[serde( rename = "$timestamp", serialize_with = "serialize_datetime", @@ -3935,7 +3935,7 @@ pub struct Event { rename = "$class", )] pub _class: String, - + #[serde( rename = "$timestamp", serialize_with = "serialize_datetime", @@ -3953,9 +3953,9 @@ exports[`codegen #formats check we can convert all formats from namespace unvers "key": "concerto.rs", "value": "use serde::{ Deserialize, Serialize }; use chrono::{ DateTime, TimeZone, Utc }; - + use crate::utils::*; - + #[derive(Debug, Serialize, Deserialize)] pub struct Concept { #[serde( @@ -3970,7 +3970,7 @@ pub struct Asset { rename = "$class", )] pub _class: String, - + #[serde( rename = "$identifier", )] @@ -3983,7 +3983,7 @@ pub struct Participant { rename = "$class", )] pub _class: String, - + #[serde( rename = "$identifier", )] @@ -4015,10 +4015,10 @@ exports[`codegen #formats check we can convert all formats from namespace unvers "key": "org_acme_hr_base.rs", "value": "use serde::{ Deserialize, Serialize }; use chrono::{ DateTime, TimeZone, Utc }; - + use crate::concerto_1_0_0::*; use crate::utils::*; - + #[derive(Debug, Serialize, Deserialize)] pub enum State { #[allow(non_camel_case_types)] @@ -4051,28 +4051,28 @@ pub struct Address { rename = "$class", )] pub _class: String, - + #[serde( rename = "street", )] pub street: String, - + #[serde( rename = "city", )] pub city: String, - + #[serde( rename = "state", skip_serializing_if = "Option::is_none", )] pub state: Option, - + #[serde( rename = "zipCode", )] pub zip_code: String, - + #[serde( rename = "country", )] @@ -4088,52 +4088,52 @@ exports[`codegen #formats check we can convert all formats from namespace unvers "key": "org_acme_hr.rs", "value": "use serde::{ Deserialize, Serialize }; use chrono::{ DateTime, TimeZone, Utc }; - + use crate::org_acme_hr_base::*; use crate::concerto_1_0_0::*; use crate::utils::*; - + #[derive(Debug, Serialize, Deserialize)] pub struct Company { #[serde( rename = "$class", )] pub _class: String, - + #[serde( rename = "name", )] pub name: String, - + #[serde( rename = "headquarters", )] pub headquarters: Address, - + #[serde( rename = "companyProperties", skip_serializing_if = "Option::is_none", )] pub company_properties: Option, - + #[serde( rename = "employeeDirectory", skip_serializing_if = "Option::is_none", )] pub employee_directory: Option, - + #[serde( rename = "employeeTShirtSizes", skip_serializing_if = "Option::is_none", )] pub employee_t_shirt_sizes: Option, - + #[serde( rename = "employeeProfiles", skip_serializing_if = "Option::is_none", )] pub employee_profiles: Option, - + #[serde( rename = "employeeSocialSecurityNumbers", skip_serializing_if = "Option::is_none", @@ -4163,12 +4163,12 @@ pub struct Equipment { rename = "$class", )] pub _class: String, - + #[serde( rename = "serialNumber", )] pub serial_number: String, - + #[serde( rename = "$identifier", )] @@ -4189,17 +4189,17 @@ pub struct Laptop { rename = "$class", )] pub _class: String, - + #[serde( rename = "make", )] pub make: LaptopMake, - + #[serde( rename = "serialNumber", )] pub serial_number: String, - + #[serde( rename = "$identifier", )] @@ -4212,55 +4212,55 @@ pub struct Person { rename = "$class", )] pub _class: String, - + #[serde( rename = "email", )] pub email: String, - + #[serde( rename = "firstName", )] pub first_name: String, - + #[serde( rename = "lastName", )] pub last_name: String, - + #[serde( rename = "middleNames", skip_serializing_if = "Option::is_none", )] pub middle_names: Option, - + #[serde( rename = "homeAddress", )] pub home_address: Address, - + #[serde( rename = "ssn", )] pub ssn: String, - + #[serde( rename = "height", )] pub height: f64, - + #[serde( rename = "dob", serialize_with = "serialize_datetime", deserialize_with = "deserialize_datetime", )] pub dob: DateTime, - + #[serde( rename = "nextOfKin", )] pub next_of_kin: NextOfKin, - + #[serde( rename = "$identifier", )] @@ -4273,93 +4273,93 @@ pub struct Employee { rename = "$class", )] pub _class: String, - + #[serde( rename = "employeeId", )] pub employee_id: String, - + #[serde( rename = "salary", )] pub salary: u64, - + #[serde( rename = "numDependents", )] pub num_dependents: Integer, - + #[serde( rename = "retired", )] pub retired: bool, - + #[serde( rename = "department", )] pub department: Department, - + #[serde( rename = "officeAddress", )] pub office_address: Address, - + #[serde( rename = "companyAssets", )] pub company_assets: Vec, - + #[serde(rename = "manager")] pub manager: Option, - + #[serde( rename = "email", )] pub email: String, - + #[serde( rename = "firstName", )] pub first_name: String, - + #[serde( rename = "lastName", )] pub last_name: String, - + #[serde( rename = "middleNames", skip_serializing_if = "Option::is_none", )] pub middle_names: Option, - + #[serde( rename = "homeAddress", )] pub home_address: Address, - + #[serde( rename = "ssn", )] pub ssn: String, - + #[serde( rename = "height", )] pub height: f64, - + #[serde( rename = "dob", serialize_with = "serialize_datetime", deserialize_with = "deserialize_datetime", )] pub dob: DateTime, - + #[serde( rename = "nextOfKin", )] pub next_of_kin: NextOfKin, - + #[serde( rename = "$identifier", )] @@ -4372,63 +4372,63 @@ pub struct Contractor { rename = "$class", )] pub _class: String, - + #[serde( rename = "company", )] pub company: Company, - + #[serde(rename = "manager")] pub manager: Option, - + #[serde( rename = "email", )] pub email: String, - + #[serde( rename = "firstName", )] pub first_name: String, - + #[serde( rename = "lastName", )] pub last_name: String, - + #[serde( rename = "middleNames", skip_serializing_if = "Option::is_none", )] pub middle_names: Option, - + #[serde( rename = "homeAddress", )] pub home_address: Address, - + #[serde( rename = "ssn", )] pub ssn: String, - + #[serde( rename = "height", )] pub height: f64, - + #[serde( rename = "dob", serialize_with = "serialize_datetime", deserialize_with = "deserialize_datetime", )] pub dob: DateTime, - + #[serde( rename = "nextOfKin", )] pub next_of_kin: NextOfKin, - + #[serde( rename = "$identifier", )] @@ -4441,96 +4441,96 @@ pub struct Manager { rename = "$class", )] pub _class: String, - + #[serde(rename = "reports")] pub reports: Option>, - + #[serde( rename = "employeeId", )] pub employee_id: String, - + #[serde( rename = "salary", )] pub salary: u64, - + #[serde( rename = "numDependents", )] pub num_dependents: Integer, - + #[serde( rename = "retired", )] pub retired: bool, - + #[serde( rename = "department", )] pub department: Department, - + #[serde( rename = "officeAddress", )] pub office_address: Address, - + #[serde( rename = "companyAssets", )] pub company_assets: Vec, - + #[serde(rename = "manager")] pub manager: Option, - + #[serde( rename = "email", )] pub email: String, - + #[serde( rename = "firstName", )] pub first_name: String, - + #[serde( rename = "lastName", )] pub last_name: String, - + #[serde( rename = "middleNames", skip_serializing_if = "Option::is_none", )] pub middle_names: Option, - + #[serde( rename = "homeAddress", )] pub home_address: Address, - + #[serde( rename = "ssn", )] pub ssn: String, - + #[serde( rename = "height", )] pub height: f64, - + #[serde( rename = "dob", serialize_with = "serialize_datetime", deserialize_with = "deserialize_datetime", )] pub dob: DateTime, - + #[serde( rename = "nextOfKin", )] pub next_of_kin: NextOfKin, - + #[serde( rename = "$identifier", )] @@ -4543,7 +4543,7 @@ pub struct CompanyEvent { rename = "$class", )] pub _class: String, - + #[serde( rename = "$timestamp", serialize_with = "serialize_datetime", @@ -4558,10 +4558,10 @@ pub struct Onboarded { rename = "$class", )] pub _class: String, - + #[serde(rename = "employee")] pub employee: Employee, - + #[serde( rename = "$timestamp", serialize_with = "serialize_datetime", @@ -4576,15 +4576,15 @@ pub struct ChangeOfAddress { rename = "$class", )] pub _class: String, - + #[serde(rename = "Person")] pub person: Person, - + #[serde( rename = "newAddress", )] pub new_address: Address, - + #[serde( rename = "$timestamp", serialize_with = "serialize_datetime", @@ -4642,7 +4642,7 @@ export interface IConcept { $class: string; } -export type ConceptUnion = IAddress | +export type ConceptUnion = IAddress | ICompany; export interface IAsset extends IConcept { @@ -4820,7 +4820,7 @@ export interface IPerson extends IParticipant { nextOfKin: NextOfKin; } -export type PersonUnion = IEmployee | +export type PersonUnion = IEmployee | IContractor; export interface IEmployee extends IPerson { @@ -4976,7 +4976,7 @@ exports[`codegen #formats check we can convert all formats from namespace unvers { "key": "concerto@1.0.0.xsd", "value": " - @@ -5032,7 +5032,7 @@ exports[`codegen #formats check we can convert all formats from namespace unvers { "key": "concerto.xsd", "value": " - @@ -5086,7 +5086,7 @@ exports[`codegen #formats check we can convert all formats from namespace unvers { "key": "org.acme.hr.base.xsd", "value": " - @@ -5109,6 +5109,16 @@ xmlns:concerto="concerto" + + + + + + + + + + @@ -5132,12 +5142,72 @@ exports[`codegen #formats check we can convert all formats from namespace unvers { "key": "org.acme.hr.xsd", "value": " - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5558,7 +5628,7 @@ exports[`codegen #formats check we can convert all formats from namespace versio "value": "@namespace("concerto@1.0.0") protocol MyProtocol { - + record Concept { } @@ -5591,7 +5661,7 @@ exports[`codegen #formats check we can convert all formats from namespace versio "value": "@namespace("concerto") protocol MyProtocol { - + record Concept { } @@ -5621,7 +5691,7 @@ exports[`codegen #formats check we can convert all formats from namespace versio protocol MyProtocol { import idl "concerto@1.0.0.avdl"; - + enum State { MA, NY, @@ -5658,7 +5728,7 @@ protocol MyProtocol { import idl "org.acme.hr.base@1.0.0.avdl"; import idl "concerto@1.0.0.avdl"; - + record Company { string name; Address headquarters; @@ -6046,7 +6116,7 @@ exports[`codegen #formats check we can convert all formats from namespace versio "value": "// Package concerto_1_0_0 contains domain objects and was generated from Concerto namespace concerto@1.0.0. package concerto_1_0_0 import "time" - + type Concept struct { } type Asset struct { @@ -6074,7 +6144,7 @@ exports[`codegen #formats check we can convert all formats from namespace versio "key": "concerto.go", "value": "// Package concerto contains domain objects and was generated from Concerto namespace concerto. package concerto - + type Concept struct { } type Asset struct { @@ -6101,7 +6171,7 @@ exports[`codegen #formats check we can convert all formats from namespace versio "value": "// Package org_acme_hr_base_1_0_0 contains domain objects and was generated from Concerto namespace org.acme.hr.base@1.0.0. package org_acme_hr_base_1_0_0 import "concerto_1_0_0"; - + type State int const ( MA State = 1 + iota @@ -6137,7 +6207,7 @@ package org_acme_hr_1_0_0 import "time" import "org_acme_hr_base_1_0_0"; import "concerto_1_0_0"; - + type Company struct { concerto_1_0_0.Concept Name string \`json:"name"\` @@ -6422,7 +6492,7 @@ public abstract class Asset extends Concept { public void set$id(String i) { $id = i; } - + // the accessor for the identifying field public String getID() { return this.get$identifier(); @@ -6461,7 +6531,7 @@ public abstract class Participant extends Concept { public void set$id(String i) { $id = i; } - + // the accessor for the identifying field public String getID() { return this.get$identifier(); @@ -6718,7 +6788,7 @@ import com.fasterxml.jackson.annotation.*; @JsonIgnoreProperties({"id"}) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "serialNumber") public abstract class Equipment extends Asset { - + // the accessor for the identifying field public String getID() { return this.getSerialNumber(); @@ -6773,7 +6843,7 @@ import com.fasterxml.jackson.annotation.*; @JsonIgnoreProperties({"id"}) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "serialNumber") public class Laptop extends Equipment { - + // the accessor for the identifying field public String getID() { return this.getSerialNumber(); @@ -6814,7 +6884,7 @@ import com.fasterxml.jackson.annotation.*; @JsonIgnoreProperties({"id"}) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "email") public abstract class Person extends Participant { - + // the accessor for the identifying field public String getID() { return this.getEmail(); @@ -6909,7 +6979,7 @@ import com.fasterxml.jackson.annotation.*; @JsonIgnoreProperties({"id"}) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "email") public class Employee extends Person { - + // the accessor for the identifying field public String getID() { return this.getEmail(); @@ -6997,7 +7067,7 @@ import com.fasterxml.jackson.annotation.*; @JsonIgnoreProperties({"id"}) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "email") public class Contractor extends Person { - + // the accessor for the identifying field public String getID() { return this.getEmail(); @@ -7043,7 +7113,7 @@ import com.fasterxml.jackson.annotation.*; @JsonIgnoreProperties({"id"}) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "email") public class Manager extends Employee { - + // the accessor for the identifying field public String getID() { return this.getEmail(); @@ -9414,7 +9484,7 @@ exports[`codegen #formats check we can convert all formats from namespace versio "key": "utils.rs", "value": "use chrono::{ DateTime, TimeZone, Utc }; use serde::{ Deserialize, Serialize, Deserializer, Serializer }; - + pub fn serialize_datetime_option(datetime: &Option>, serializer: S) -> Result where S: Serializer, @@ -9444,7 +9514,7 @@ where let datetime_str = String::deserialize(deserializer)?; Utc.datetime_from_str(&datetime_str, "%Y-%m-%dT%H:%M:%S%.3f%Z").map_err(serde::de::Error::custom) } - + pub fn serialize_datetime(datetime: &chrono::DateTime, serializer: S) -> Result where S: Serializer, @@ -9461,9 +9531,9 @@ exports[`codegen #formats check we can convert all formats from namespace versio "key": "concerto_1_0_0.rs", "value": "use serde::{ Deserialize, Serialize }; use chrono::{ DateTime, TimeZone, Utc }; - + use crate::utils::*; - + #[derive(Debug, Serialize, Deserialize)] pub struct Concept { #[serde( @@ -9478,7 +9548,7 @@ pub struct Asset { rename = "$class", )] pub _class: String, - + #[serde( rename = "$identifier", )] @@ -9491,7 +9561,7 @@ pub struct Participant { rename = "$class", )] pub _class: String, - + #[serde( rename = "$identifier", )] @@ -9504,7 +9574,7 @@ pub struct Transaction { rename = "$class", )] pub _class: String, - + #[serde( rename = "$timestamp", serialize_with = "serialize_datetime", @@ -9519,7 +9589,7 @@ pub struct Event { rename = "$class", )] pub _class: String, - + #[serde( rename = "$timestamp", serialize_with = "serialize_datetime", @@ -9537,9 +9607,9 @@ exports[`codegen #formats check we can convert all formats from namespace versio "key": "concerto.rs", "value": "use serde::{ Deserialize, Serialize }; use chrono::{ DateTime, TimeZone, Utc }; - + use crate::utils::*; - + #[derive(Debug, Serialize, Deserialize)] pub struct Concept { #[serde( @@ -9554,7 +9624,7 @@ pub struct Asset { rename = "$class", )] pub _class: String, - + #[serde( rename = "$identifier", )] @@ -9567,7 +9637,7 @@ pub struct Participant { rename = "$class", )] pub _class: String, - + #[serde( rename = "$identifier", )] @@ -9599,10 +9669,10 @@ exports[`codegen #formats check we can convert all formats from namespace versio "key": "org_acme_hr_base_1_0_0.rs", "value": "use serde::{ Deserialize, Serialize }; use chrono::{ DateTime, TimeZone, Utc }; - + use crate::concerto_1_0_0::*; use crate::utils::*; - + #[derive(Debug, Serialize, Deserialize)] pub enum State { #[allow(non_camel_case_types)] @@ -9635,28 +9705,28 @@ pub struct Address { rename = "$class", )] pub _class: String, - + #[serde( rename = "street", )] pub street: String, - + #[serde( rename = "city", )] pub city: String, - + #[serde( rename = "state", skip_serializing_if = "Option::is_none", )] pub state: Option, - + #[serde( rename = "zipCode", )] pub zip_code: String, - + #[serde( rename = "country", )] @@ -9672,52 +9742,52 @@ exports[`codegen #formats check we can convert all formats from namespace versio "key": "org_acme_hr_1_0_0.rs", "value": "use serde::{ Deserialize, Serialize }; use chrono::{ DateTime, TimeZone, Utc }; - + use crate::org_acme_hr_base_1_0_0::*; use crate::concerto_1_0_0::*; use crate::utils::*; - + #[derive(Debug, Serialize, Deserialize)] pub struct Company { #[serde( rename = "$class", )] pub _class: String, - + #[serde( rename = "name", )] pub name: String, - + #[serde( rename = "headquarters", )] pub headquarters: Address, - + #[serde( rename = "companyProperties", skip_serializing_if = "Option::is_none", )] pub company_properties: Option, - + #[serde( rename = "employeeDirectory", skip_serializing_if = "Option::is_none", )] pub employee_directory: Option, - + #[serde( rename = "employeeTShirtSizes", skip_serializing_if = "Option::is_none", )] pub employee_t_shirt_sizes: Option, - + #[serde( rename = "employeeProfiles", skip_serializing_if = "Option::is_none", )] pub employee_profiles: Option, - + #[serde( rename = "employeeSocialSecurityNumbers", skip_serializing_if = "Option::is_none", @@ -9747,12 +9817,12 @@ pub struct Equipment { rename = "$class", )] pub _class: String, - + #[serde( rename = "serialNumber", )] pub serial_number: String, - + #[serde( rename = "$identifier", )] @@ -9773,17 +9843,17 @@ pub struct Laptop { rename = "$class", )] pub _class: String, - + #[serde( rename = "make", )] pub make: LaptopMake, - + #[serde( rename = "serialNumber", )] pub serial_number: String, - + #[serde( rename = "$identifier", )] @@ -9796,55 +9866,55 @@ pub struct Person { rename = "$class", )] pub _class: String, - + #[serde( rename = "email", )] pub email: String, - + #[serde( rename = "firstName", )] pub first_name: String, - + #[serde( rename = "lastName", )] pub last_name: String, - + #[serde( rename = "middleNames", skip_serializing_if = "Option::is_none", )] pub middle_names: Option, - + #[serde( rename = "homeAddress", )] pub home_address: Address, - + #[serde( rename = "ssn", )] pub ssn: String, - + #[serde( rename = "height", )] pub height: f64, - + #[serde( rename = "dob", serialize_with = "serialize_datetime", deserialize_with = "deserialize_datetime", )] pub dob: DateTime, - + #[serde( rename = "nextOfKin", )] pub next_of_kin: NextOfKin, - + #[serde( rename = "$identifier", )] @@ -9857,93 +9927,93 @@ pub struct Employee { rename = "$class", )] pub _class: String, - + #[serde( rename = "employeeId", )] pub employee_id: String, - + #[serde( rename = "salary", )] pub salary: u64, - + #[serde( rename = "numDependents", )] pub num_dependents: Integer, - + #[serde( rename = "retired", )] pub retired: bool, - + #[serde( rename = "department", )] pub department: Department, - + #[serde( rename = "officeAddress", )] pub office_address: Address, - + #[serde( rename = "companyAssets", )] pub company_assets: Vec, - + #[serde(rename = "manager")] pub manager: Option, - + #[serde( rename = "email", )] pub email: String, - + #[serde( rename = "firstName", )] pub first_name: String, - + #[serde( rename = "lastName", )] pub last_name: String, - + #[serde( rename = "middleNames", skip_serializing_if = "Option::is_none", )] pub middle_names: Option, - + #[serde( rename = "homeAddress", )] pub home_address: Address, - + #[serde( rename = "ssn", )] pub ssn: String, - + #[serde( rename = "height", )] pub height: f64, - + #[serde( rename = "dob", serialize_with = "serialize_datetime", deserialize_with = "deserialize_datetime", )] pub dob: DateTime, - + #[serde( rename = "nextOfKin", )] pub next_of_kin: NextOfKin, - + #[serde( rename = "$identifier", )] @@ -9956,63 +10026,63 @@ pub struct Contractor { rename = "$class", )] pub _class: String, - + #[serde( rename = "company", )] pub company: Company, - + #[serde(rename = "manager")] pub manager: Option, - + #[serde( rename = "email", )] pub email: String, - + #[serde( rename = "firstName", )] pub first_name: String, - + #[serde( rename = "lastName", )] pub last_name: String, - + #[serde( rename = "middleNames", skip_serializing_if = "Option::is_none", )] pub middle_names: Option, - + #[serde( rename = "homeAddress", )] pub home_address: Address, - + #[serde( rename = "ssn", )] pub ssn: String, - + #[serde( rename = "height", )] pub height: f64, - + #[serde( rename = "dob", serialize_with = "serialize_datetime", deserialize_with = "deserialize_datetime", )] pub dob: DateTime, - + #[serde( rename = "nextOfKin", )] pub next_of_kin: NextOfKin, - + #[serde( rename = "$identifier", )] @@ -10025,96 +10095,96 @@ pub struct Manager { rename = "$class", )] pub _class: String, - + #[serde(rename = "reports")] pub reports: Option>, - + #[serde( rename = "employeeId", )] pub employee_id: String, - + #[serde( rename = "salary", )] pub salary: u64, - + #[serde( rename = "numDependents", )] pub num_dependents: Integer, - + #[serde( rename = "retired", )] pub retired: bool, - + #[serde( rename = "department", )] pub department: Department, - + #[serde( rename = "officeAddress", )] pub office_address: Address, - + #[serde( rename = "companyAssets", )] pub company_assets: Vec, - + #[serde(rename = "manager")] pub manager: Option, - + #[serde( rename = "email", )] pub email: String, - + #[serde( rename = "firstName", )] pub first_name: String, - + #[serde( rename = "lastName", )] pub last_name: String, - + #[serde( rename = "middleNames", skip_serializing_if = "Option::is_none", )] pub middle_names: Option, - + #[serde( rename = "homeAddress", )] pub home_address: Address, - + #[serde( rename = "ssn", )] pub ssn: String, - + #[serde( rename = "height", )] pub height: f64, - + #[serde( rename = "dob", serialize_with = "serialize_datetime", deserialize_with = "deserialize_datetime", )] pub dob: DateTime, - + #[serde( rename = "nextOfKin", )] pub next_of_kin: NextOfKin, - + #[serde( rename = "$identifier", )] @@ -10127,7 +10197,7 @@ pub struct CompanyEvent { rename = "$class", )] pub _class: String, - + #[serde( rename = "$timestamp", serialize_with = "serialize_datetime", @@ -10142,10 +10212,10 @@ pub struct Onboarded { rename = "$class", )] pub _class: String, - + #[serde(rename = "employee")] pub employee: Employee, - + #[serde( rename = "$timestamp", serialize_with = "serialize_datetime", @@ -10160,15 +10230,15 @@ pub struct ChangeOfAddress { rename = "$class", )] pub _class: String, - + #[serde(rename = "Person")] pub person: Person, - + #[serde( rename = "newAddress", )] pub new_address: Address, - + #[serde( rename = "$timestamp", serialize_with = "serialize_datetime", @@ -10226,7 +10296,7 @@ export interface IConcept { $class: string; } -export type ConceptUnion = IAddress | +export type ConceptUnion = IAddress | ICompany; export interface IAsset extends IConcept { @@ -10404,7 +10474,7 @@ export interface IPerson extends IParticipant { nextOfKin: NextOfKin; } -export type PersonUnion = IEmployee | +export type PersonUnion = IEmployee | IContractor; export interface IEmployee extends IPerson { @@ -10560,7 +10630,7 @@ exports[`codegen #formats check we can convert all formats from namespace versio { "key": "concerto@1.0.0.xsd", "value": " - @@ -10616,7 +10686,7 @@ exports[`codegen #formats check we can convert all formats from namespace versio { "key": "concerto.xsd", "value": " - @@ -10670,7 +10740,7 @@ exports[`codegen #formats check we can convert all formats from namespace versio { "key": "org.acme.hr.base@1.0.0.xsd", "value": " - @@ -10693,6 +10763,16 @@ xmlns:concerto="concerto" + + + + + + + + + + @@ -10716,12 +10796,72 @@ exports[`codegen #formats check we can convert all formats from namespace versio { "key": "org.acme.hr@1.0.0.xsd", "value": " - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +