forked from loafle/openapi-generator-original
Use substring instead of substr (#15937)
This commit is contained in:
committed by
GitHub
parent
fac04cfa9d
commit
8fe4d780ed
@@ -132,7 +132,7 @@ export class {{classname}} {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString(){{^isDateTime}}.substr(0, 10){{/isDateTime}});
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString(){{^isDateTime}}.substring(0, 10){{/isDateTime}});
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
|
||||
{{^isDateTime}}
|
||||
{{#isDate}}
|
||||
localVarQueryParameter['{{baseName}}'] = ({{paramName}} as any instanceof Date) ?
|
||||
({{paramName}} as any).toISOString().substr(0,10) :
|
||||
({{paramName}} as any).toISOString().substring(0,10) :
|
||||
{{paramName}};
|
||||
{{/isDate}}
|
||||
{{^isDate}}
|
||||
|
||||
@@ -128,7 +128,7 @@ export class {{classname}} extends runtime.BaseAPI {
|
||||
{{/isDateTimeType}}
|
||||
{{^isDateTimeType}}
|
||||
{{#isDateType}}
|
||||
queryParameters['{{baseName}}'] = (requestParameters.{{paramName}} as any).toISOString().substr(0,10);
|
||||
queryParameters['{{baseName}}'] = (requestParameters.{{paramName}} as any).toISOString().substring(0,10);
|
||||
{{/isDateType}}
|
||||
{{^isDateType}}
|
||||
queryParameters['{{baseName}}'] = requestParameters.{{paramName}};
|
||||
|
||||
@@ -119,7 +119,7 @@ export function {{classname}}ToJSON(value?: {{classname}} | null): any {
|
||||
{{^isReadOnly}}
|
||||
{{#isPrimitiveType}}
|
||||
{{#isDateType}}
|
||||
'{{baseName}}': {{^required}}value.{{name}} === undefined ? undefined : {{/required}}({{#isNullable}}value.{{name}} === null ? null : {{/isNullable}}value.{{name}}.toISOString().substr(0,10)),
|
||||
'{{baseName}}': {{^required}}value.{{name}} === undefined ? undefined : {{/required}}({{#isNullable}}value.{{name}} === null ? null : {{/isNullable}}value.{{name}}.toISOString().substring(0,10)),
|
||||
{{/isDateType}}
|
||||
{{#isDateTimeType}}
|
||||
'{{baseName}}': {{^required}}value.{{name}} === undefined ? undefined : {{/required}}({{#isNullable}}value.{{name}} === null ? null : {{/isNullable}}value.{{name}}.toISOString()),
|
||||
|
||||
@@ -71,7 +71,7 @@ function {{nickname}}Raw<T>({{#allParams.0}}requestParameters: {{operationIdCame
|
||||
{{/isDateTime}}
|
||||
{{^isDateTime}}
|
||||
{{#isDate}}
|
||||
queryParameters['{{baseName}}'] = (requestParameters.{{paramName}} as any).toISOString().substr(0,10);
|
||||
queryParameters['{{baseName}}'] = (requestParameters.{{paramName}} as any).toISOString().substring(0,10);
|
||||
{{/isDate}}
|
||||
{{^isDate}}
|
||||
queryParameters['{{baseName}}'] = requestParameters.{{paramName}};
|
||||
|
||||
@@ -92,7 +92,7 @@ export function {{classname}}ToJSON(value?: {{classname}}): any {
|
||||
{{#vars}}
|
||||
{{^isReadOnly}}
|
||||
{{#isPrimitiveType}}
|
||||
'{{baseName}}': {{#isDate}}{{^required}}value.{{name}} === undefined ? undefined : {{/required}}value.{{name}}.toISOString().substr(0,10){{/isDate}}{{#isDateTime}}{{^required}}value.{{name}} === undefined ? undefined : {{/required}}value.{{name}}.toISOString(){{/isDateTime}}{{^isDate}}{{^isDateTime}}value.{{name}}{{/isDateTime}}{{/isDate}},
|
||||
'{{baseName}}': {{#isDate}}{{^required}}value.{{name}} === undefined ? undefined : {{/required}}value.{{name}}.toISOString().substring(0,10){{/isDate}}{{#isDateTime}}{{^required}}value.{{name}} === undefined ? undefined : {{/required}}value.{{name}}.toISOString(){{/isDateTime}}{{^isDate}}{{^isDateTime}}value.{{name}}{{/isDateTime}}{{/isDate}},
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
{{#isArray}}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class UserService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class ProjectService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class MatrixParamsService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class PetService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class StoreService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class UserService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class DefaultService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class PetService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class StoreService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class UserService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class PetService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class StoreService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class UserService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class PetService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class StoreService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class UserService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class DefaultService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class PetService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class StoreService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class UserService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class PetService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class StoreService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class UserService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class PetService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class StoreService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class UserService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class PetService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class StoreService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class UserService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ export class PetService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ export class StoreService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ export class UserService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class PetService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class StoreService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export class UserService {
|
||||
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
|
||||
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ export function FormatTestToJSON(value?: FormatTest | null): any {
|
||||
'string': value.string,
|
||||
'byte': value._byte,
|
||||
'binary': value.binary,
|
||||
'date': (value.date.toISOString().substr(0,10)),
|
||||
'date': (value.date.toISOString().substring(0,10)),
|
||||
'dateTime': value.dateTime === undefined ? undefined : (value.dateTime.toISOString()),
|
||||
'uuid': value.uuid,
|
||||
'password': value.password,
|
||||
|
||||
@@ -151,7 +151,7 @@ export function InlineObject3ToJSON(value?: InlineObject3 | null): any {
|
||||
'pattern_without_delimiter': value.patternWithoutDelimiter,
|
||||
'byte': value._byte,
|
||||
'binary': value.binary,
|
||||
'date': value.date === undefined ? undefined : (value.date.toISOString().substr(0,10)),
|
||||
'date': value.date === undefined ? undefined : (value.date.toISOString().substring(0,10)),
|
||||
'dateTime': value.dateTime === undefined ? undefined : (value.dateTime.toISOString()),
|
||||
'password': value.password,
|
||||
'callback': value.callback,
|
||||
|
||||
@@ -143,7 +143,7 @@ export function NullableClassToJSON(value?: NullableClass | null): any {
|
||||
'number_prop': value.numberProp,
|
||||
'boolean_prop': value.booleanProp,
|
||||
'string_prop': value.stringProp,
|
||||
'date_prop': value.dateProp === undefined ? undefined : (value.dateProp === null ? null : value.dateProp.toISOString().substr(0,10)),
|
||||
'date_prop': value.dateProp === undefined ? undefined : (value.dateProp === null ? null : value.dateProp.toISOString().substring(0,10)),
|
||||
'datetime_prop': value.datetimeProp === undefined ? undefined : (value.datetimeProp === null ? null : value.datetimeProp.toISOString()),
|
||||
'array_nullable_prop': value.arrayNullableProp,
|
||||
'array_and_items_nullable_prop': value.arrayAndItemsNullableProp,
|
||||
|
||||
@@ -185,7 +185,7 @@ export function FormatTestToJSON(value?: FormatTest | null): any {
|
||||
'string': value.string,
|
||||
'byte': value._byte,
|
||||
'binary': value.binary,
|
||||
'date': (value.date.toISOString().substr(0,10)),
|
||||
'date': (value.date.toISOString().substring(0,10)),
|
||||
'dateTime': value.dateTime === undefined ? undefined : (value.dateTime.toISOString()),
|
||||
'uuid': value.uuid,
|
||||
'password': value.password,
|
||||
|
||||
@@ -143,7 +143,7 @@ export function NullableClassToJSON(value?: NullableClass | null): any {
|
||||
'number_prop': value.numberProp,
|
||||
'boolean_prop': value.booleanProp,
|
||||
'string_prop': value.stringProp,
|
||||
'date_prop': value.dateProp === undefined ? undefined : (value.dateProp === null ? null : value.dateProp.toISOString().substr(0,10)),
|
||||
'date_prop': value.dateProp === undefined ? undefined : (value.dateProp === null ? null : value.dateProp.toISOString().substring(0,10)),
|
||||
'datetime_prop': value.datetimeProp === undefined ? undefined : (value.datetimeProp === null ? null : value.datetimeProp.toISOString()),
|
||||
'array_nullable_prop': value.arrayNullableProp,
|
||||
'array_and_items_nullable_prop': value.arrayAndItemsNullableProp,
|
||||
|
||||
Reference in New Issue
Block a user