Skip to content

Commit 514e81e

Browse files
committed
fix(TS): regenerate with the new generator
1 parent e75bfa0 commit 514e81e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+127
-126
lines changed

src/TypeScriptSDK/models/Building.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IsInstance, ValidateNested, IsDefined, IsString, IsOptional, Matches, IsArray, validate, ValidationError as TsValidationError } from 'class-validator';
2-
import { Type, plainToClass } from 'class-transformer';
2+
import { Type, plainToClass, instanceToPlain } from 'class-transformer';
33
import { BuildingPropertiesAbridged } from "./BuildingPropertiesAbridged";
44
import { IDdBaseModel } from "honeybee-schema";
55
import { RoofSpecification } from "./RoofSpecification";
@@ -83,8 +83,8 @@ export class Building extends IDdBaseModel {
8383
data["unique_stories"] = this.unique_stories;
8484
data["room_3ds"] = this.room_3ds;
8585
data["roof"] = this.roof;
86-
super.toJSON(data);
87-
return data;
86+
data = super.toJSON(data);
87+
return instanceToPlain(data);
8888
}
8989

9090
async validate(): Promise<boolean> {

src/TypeScriptSDK/models/BuildingEnergyPropertiesAbridged.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IsString, IsOptional, Matches, MinLength, MaxLength, validate, ValidationError as TsValidationError } from 'class-validator';
2-
import { Type, plainToClass } from 'class-transformer';
2+
import { Type, plainToClass, instanceToPlain } from 'class-transformer';
33
import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
44

55
/** Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects. */
@@ -50,8 +50,8 @@ export class BuildingEnergyPropertiesAbridged extends _OpenAPIGenBaseModel {
5050

5151
data["type"] = this.type;
5252
data["construction_set"] = this.construction_set;
53-
super.toJSON(data);
54-
return data;
53+
data = super.toJSON(data);
54+
return instanceToPlain(data);
5555
}
5656

5757
async validate(): Promise<boolean> {

src/TypeScriptSDK/models/BuildingPropertiesAbridged.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator';
2-
import { Type, plainToClass } from 'class-transformer';
2+
import { Type, plainToClass, instanceToPlain } from 'class-transformer';
33
import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
44
import { BuildingEnergyPropertiesAbridged } from "./BuildingEnergyPropertiesAbridged";
55
import { BuildingRadiancePropertiesAbridged } from "./BuildingRadiancePropertiesAbridged";
@@ -58,8 +58,8 @@ export class BuildingPropertiesAbridged extends _OpenAPIGenBaseModel {
5858
data["type"] = this.type;
5959
data["energy"] = this.energy;
6060
data["radiance"] = this.radiance;
61-
super.toJSON(data);
62-
return data;
61+
data = super.toJSON(data);
62+
return instanceToPlain(data);
6363
}
6464

6565
async validate(): Promise<boolean> {

src/TypeScriptSDK/models/BuildingRadiancePropertiesAbridged.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2-
import { Type, plainToClass } from 'class-transformer';
2+
import { Type, plainToClass, instanceToPlain } from 'class-transformer';
33
import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
44

55
/** Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects. */
@@ -48,8 +48,8 @@ export class BuildingRadiancePropertiesAbridged extends _OpenAPIGenBaseModel {
4848

4949
data["type"] = this.type;
5050
data["modifier_set"] = this.modifier_set;
51-
super.toJSON(data);
52-
return data;
51+
data = super.toJSON(data);
52+
return instanceToPlain(data);
5353
}
5454

5555
async validate(): Promise<boolean> {

src/TypeScriptSDK/models/ContextShade.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IsArray, IsDefined, IsInstance, ValidateNested, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
2-
import { Type, plainToClass } from 'class-transformer';
2+
import { Type, plainToClass, instanceToPlain } from 'class-transformer';
33
import { ContextShadePropertiesAbridged } from "./ContextShadePropertiesAbridged";
44
import { Face3D } from "honeybee-schema";
55
import { IDdBaseModel } from "honeybee-schema";
@@ -68,8 +68,8 @@ export class ContextShade extends IDdBaseModel {
6868
data["properties"] = this.properties;
6969
data["type"] = this.type;
7070
data["is_detached"] = this.is_detached;
71-
super.toJSON(data);
72-
return data;
71+
data = super.toJSON(data);
72+
return instanceToPlain(data);
7373
}
7474

7575
async validate(): Promise<boolean> {

src/TypeScriptSDK/models/ContextShadeEnergyPropertiesAbridged.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IsString, IsOptional, Matches, MinLength, MaxLength, validate, ValidationError as TsValidationError } from 'class-validator';
2-
import { Type, plainToClass } from 'class-transformer';
2+
import { Type, plainToClass, instanceToPlain } from 'class-transformer';
33
import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
44

55
/** Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects. */
@@ -59,8 +59,8 @@ export class ContextShadeEnergyPropertiesAbridged extends _OpenAPIGenBaseModel {
5959
data["type"] = this.type;
6060
data["construction"] = this.construction;
6161
data["transmittance_schedule"] = this.transmittance_schedule;
62-
super.toJSON(data);
63-
return data;
62+
data = super.toJSON(data);
63+
return instanceToPlain(data);
6464
}
6565

6666
async validate(): Promise<boolean> {

src/TypeScriptSDK/models/ContextShadePropertiesAbridged.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator';
2-
import { Type, plainToClass } from 'class-transformer';
2+
import { Type, plainToClass, instanceToPlain } from 'class-transformer';
33
import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
44
import { ContextShadeEnergyPropertiesAbridged } from "./ContextShadeEnergyPropertiesAbridged";
55
import { ContextShadeRadiancePropertiesAbridged } from "./ContextShadeRadiancePropertiesAbridged";
@@ -58,8 +58,8 @@ export class ContextShadePropertiesAbridged extends _OpenAPIGenBaseModel {
5858
data["type"] = this.type;
5959
data["energy"] = this.energy;
6060
data["radiance"] = this.radiance;
61-
super.toJSON(data);
62-
return data;
61+
data = super.toJSON(data);
62+
return instanceToPlain(data);
6363
}
6464

6565
async validate(): Promise<boolean> {

src/TypeScriptSDK/models/ContextShadeRadiancePropertiesAbridged.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
2-
import { Type, plainToClass } from 'class-transformer';
2+
import { Type, plainToClass, instanceToPlain } from 'class-transformer';
33
import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
44

55
/** Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects. */
@@ -48,8 +48,8 @@ export class ContextShadeRadiancePropertiesAbridged extends _OpenAPIGenBaseModel
4848

4949
data["type"] = this.type;
5050
data["modifier"] = this.modifier;
51-
super.toJSON(data);
52-
return data;
51+
data = super.toJSON(data);
52+
return instanceToPlain(data);
5353
}
5454

5555
async validate(): Promise<boolean> {

src/TypeScriptSDK/models/DetailedSkylights.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IsArray, IsDefined, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
2-
import { Type, plainToClass } from 'class-transformer';
2+
import { Type, plainToClass, instanceToPlain } from 'class-transformer';
33
import { IsNestedNumberArray } from "./../helpers/class-validator";
44
import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
55

@@ -58,8 +58,8 @@ export class DetailedSkylights extends _OpenAPIGenBaseModel {
5858
data["polygons"] = this.polygons;
5959
data["type"] = this.type;
6060
data["are_doors"] = this.are_doors;
61-
super.toJSON(data);
62-
return data;
61+
data = super.toJSON(data);
62+
return instanceToPlain(data);
6363
}
6464

6565
async validate(): Promise<boolean> {

0 commit comments

Comments
 (0)