Skip to content

Commit cfd6547

Browse files
committed
fix(Ts): regenerate with min/max validation
1 parent 948e7c3 commit cfd6547

Some content is hidden

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

42 files changed

+110
-42
lines changed

src/TypeScriptSDK/models/Building.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IsInstance, ValidateNested, IsDefined, IsString, IsOptional, IsArray, validate, ValidationError as TsValidationError } from 'class-validator';
1+
import { IsInstance, ValidateNested, IsDefined, IsString, IsOptional, Matches, IsArray, validate, ValidationError as TsValidationError } from 'class-validator';
22
import { Type, plainToClass } from 'class-transformer';
33
import { BuildingPropertiesAbridged } from "./BuildingPropertiesAbridged";
44
import { IDdBaseModel } from "honeybee-schema";
@@ -17,6 +17,7 @@ export class Building extends IDdBaseModel {
1717

1818
@IsString()
1919
@IsOptional()
20+
@Matches(/^Building$/)
2021
type?: string;
2122

2223
@IsArray()

src/TypeScriptSDK/models/BuildingEnergyPropertiesAbridged.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
import { IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator';
1+
import { IsString, IsOptional, Matches, MinLength, MaxLength, validate, ValidationError as TsValidationError } from 'class-validator';
22
import { Type, plainToClass } 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. */
66
export class BuildingEnergyPropertiesAbridged extends _OpenAPIGenBaseModel {
77
@IsString()
88
@IsOptional()
9+
@Matches(/^BuildingEnergyPropertiesAbridged$/)
910
type?: string;
1011

1112
@IsString()
1213
@IsOptional()
14+
@MinLength(1)
15+
@MaxLength(100)
1316
/** Name of a ConstructionSet to specify all constructions for the Building. If None, the Model global_construction_set will be used. */
1417
construction_set?: string;
1518

src/TypeScriptSDK/models/BuildingPropertiesAbridged.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IsString, IsOptional, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator';
1+
import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator';
22
import { Type, plainToClass } from 'class-transformer';
33
import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
44
import { BuildingEnergyPropertiesAbridged } from "./BuildingEnergyPropertiesAbridged";
@@ -7,6 +7,7 @@ import { BuildingRadiancePropertiesAbridged } from "./BuildingRadianceProperties
77
export class BuildingPropertiesAbridged extends _OpenAPIGenBaseModel {
88
@IsString()
99
@IsOptional()
10+
@Matches(/^BuildingPropertiesAbridged$/)
1011
type?: string;
1112

1213
@IsInstance(BuildingEnergyPropertiesAbridged)

src/TypeScriptSDK/models/BuildingRadiancePropertiesAbridged.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import { IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator';
1+
import { IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
22
import { Type, plainToClass } 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. */
66
export class BuildingRadiancePropertiesAbridged extends _OpenAPIGenBaseModel {
77
@IsString()
88
@IsOptional()
9+
@Matches(/^BuildingRadiancePropertiesAbridged$/)
910
type?: string;
1011

1112
@IsString()

src/TypeScriptSDK/models/ContextShade.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IsArray, IsDefined, IsInstance, ValidateNested, IsString, IsOptional, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
1+
import { IsArray, IsDefined, IsInstance, ValidateNested, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
22
import { Type, plainToClass } from 'class-transformer';
33
import { ContextShadePropertiesAbridged } from "./ContextShadePropertiesAbridged";
44
import { Face3D } from "honeybee-schema";
@@ -21,6 +21,7 @@ export class ContextShade extends IDdBaseModel {
2121

2222
@IsString()
2323
@IsOptional()
24+
@Matches(/^ContextShade$/)
2425
type?: string;
2526

2627
@IsBoolean()

src/TypeScriptSDK/models/ContextShadeEnergyPropertiesAbridged.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
1-
import { IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator';
1+
import { IsString, IsOptional, Matches, MinLength, MaxLength, validate, ValidationError as TsValidationError } from 'class-validator';
22
import { Type, plainToClass } 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. */
66
export class ContextShadeEnergyPropertiesAbridged extends _OpenAPIGenBaseModel {
77
@IsString()
88
@IsOptional()
9+
@Matches(/^ContextShadeEnergyPropertiesAbridged$/)
910
type?: string;
1011

1112
@IsString()
1213
@IsOptional()
14+
@MinLength(1)
15+
@MaxLength(100)
1316
/** Name of a ShadeConstruction to set the reflectance and specularity of the ContextShade. If None, the the EnergyPlus default of 0.2 diffuse reflectance will be used. */
1417
construction?: string;
1518

1619
@IsString()
1720
@IsOptional()
21+
@MinLength(1)
22+
@MaxLength(100)
1823
/** Name of a schedule to set the transmittance of the ContextShade, which can vary throughout the simulation. If None, the ContextShade will be completely opaque. */
1924
transmittance_schedule?: string;
2025

src/TypeScriptSDK/models/ContextShadePropertiesAbridged.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IsString, IsOptional, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator';
1+
import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator';
22
import { Type, plainToClass } from 'class-transformer';
33
import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
44
import { ContextShadeEnergyPropertiesAbridged } from "./ContextShadeEnergyPropertiesAbridged";
@@ -7,6 +7,7 @@ import { ContextShadeRadiancePropertiesAbridged } from "./ContextShadeRadiancePr
77
export class ContextShadePropertiesAbridged extends _OpenAPIGenBaseModel {
88
@IsString()
99
@IsOptional()
10+
@Matches(/^ContextShadePropertiesAbridged$/)
1011
type?: string;
1112

1213
@IsInstance(ContextShadeEnergyPropertiesAbridged)

src/TypeScriptSDK/models/ContextShadeRadiancePropertiesAbridged.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import { IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator';
1+
import { IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator';
22
import { Type, plainToClass } 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. */
66
export class ContextShadeRadiancePropertiesAbridged extends _OpenAPIGenBaseModel {
77
@IsString()
88
@IsOptional()
9+
@Matches(/^ContextShadeRadiancePropertiesAbridged$/)
910
type?: string;
1011

1112
@IsString()

src/TypeScriptSDK/models/DetailedSkylights.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IsArray, ValidateNested, IsNumber, IsDefined, IsString, IsOptional, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
1+
import { IsArray, ValidateNested, IsNumber, IsDefined, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator';
22
import { Type, plainToClass } from 'class-transformer';
33
import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel";
44

@@ -18,6 +18,7 @@ export class DetailedSkylights extends _OpenAPIGenBaseModel {
1818

1919
@IsString()
2020
@IsOptional()
21+
@Matches(/^DetailedSkylights$/)
2122
type?: string;
2223

2324
@IsArray()

0 commit comments

Comments
 (0)