Skip to content

Commit fe10060

Browse files
cs fixes
1 parent 74351c7 commit fe10060

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

modules/openapi-generator/src/main/resources/typescript/model/ObjectSerializer.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class ObjectSerializer {
155155
}
156156
}
157157
158-
public static hasFindMatchingTypeMethod(klass: any): boolean {
158+
private static hasFindMatchingTypeMethod(klass: any): boolean {
159159
if (typeof klass.findMatchingType === 'function') {
160160
return true;
161161
}

modules/openapi-generator/src/main/resources/typescript/model/OneOfClass.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export class OneOfClass {
22
public static instanceOf(data: any, attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string, required: boolean}>): boolean {
3-
for(const attribute of attributeTypeMap) {
3+
for (const attribute of attributeTypeMap) {
44
if (attribute.required) {
55
if (!(attribute.baseName in data) || data[attribute.baseName] === undefined) {
66
return false;

modules/openapi-generator/src/main/resources/typescript/model/modelOneOf.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ export class {{classname}}Class extends OneOfClass {
3030
static readonly mapping: {[index: string]: string} | undefined = undefined;
3131
{{/hasDiscriminatorWithNonEmptyMapping}}
3232

33-
static readonly arrayOfTypes: Array<{{#oneOf}}typeof {{{.}}}{{^-last}} | {{/-last}}{{/oneOf}}> = [{{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}];
33+
private static readonly arrayOfTypes: Array<{{#oneOf}}typeof {{{.}}}{{^-last}} | {{/-last}}{{/oneOf}}> = [{{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}];
3434

35-
public static findMatchingType(data:any): string | undefined {
36-
for(const type of this.arrayOfTypes) {
35+
public static findMatchingType(data: any): string | undefined {
36+
for (const type of this.arrayOfTypes) {
3737
if (this.instanceOf(data, type.getAttributeTypeMap())) {
3838
return type.name;
3939
}

0 commit comments

Comments
 (0)