Open sankp opened 6 years ago
One of the backing model's properties seems to throw an exception. Can you provide a sample spec + config to reproduce this?
@RSuter Here i have added.
"swaggerToTypeScriptClient": { "className": "{controller}ApiClient", "moduleName": "", "namespace": "", "typeScriptVersion": 2.7, "template": "Angular", "promiseType": "Promise", "httpClass": "HttpClient", "useSingletonProvider": true, "injectionTokenType": "InjectionToken", "rxJsVersion": 6.0, "dateTimeType": "Date", "nullValue": "Undefined", "generateClientClasses": true, "generateClientInterfaces": true, "generateOptionalParameters": false, "exportTypes": true, "wrapDtoExceptions": false, "clientBaseClass": null, "wrapResponses": false, "wrapResponseMethods": [], "generateResponseClasses": true, "responseClass": "SwaggerResponse", "protectedMethods": [], "configurationClass": null, "useTransformOptionsMethod": true, "useTransformResultMethod": true, "generateDtoTypes": true, "operationGenerationMode": "SingleClientFromOperationId", "markOptionalProperties": false, "generateCloneMethod": false, "typeStyle": "Class", "classTypes": [], "extendedClasses": [ "ApiClient" ], "extensionCode": null, "generateDefaultValues": true, "excludedTypeNames": [], "handleReferences": false, "generateConstructorInterface": true, "convertConstructorInterfaceData": false, "importRequiredTypes": true, "useGetBaseUrlMethod": false, "baseUrlTokenName": "API_BASE_URL", "queryNullValue": "", "templateDirectory": null, "typeNameGeneratorType": null, "propertyNameGeneratorType": null, "enumNameGeneratorType": null, "serviceHost": null, "serviceSchemes": null, "output": "" }
Is this still an issue? Canyou also post a sample swagger spec?
@RicoSuter I had the same issue here, with the following:
"/api/services/app/Configuration/ChangeLogo2":{
"post":{
"tags":[
"Configuration"
],
"operationId":"ApiServicesAppConfigurationChangeLogo2Post",
"consumes":[
"application/json-patch+json",
"application/json",
"text/json",
"application/*+json"
],
"produces":[
],
"parameters":[
{
"name":"tenantId",
"in":"body",
"required":false,
"schema":{
"format":"int32",
"type":"integer"
}
},
{
"name":"image",
"in":"body",
"required":false,
"schema":{
"type":"string"
}
}
],
"responses":{
"200":{
"description":"Success"
}
}
}
},
I downloaded tool v11.19.2.0 to upgrade angular 4 project to angular 6 project so i can regenerate my typescript client. I am running into this error on my base class creation.
Liquid error: Exception has been thrown by the target of an invocation. Liquid error: Exception has been thrown by the target of an invocation.