@@ -103,8 +103,18 @@ public virtual void Write(AngularWriteConfiguration configuration, List<ITransfe
103
103
TypeTransferObject returnModelType = isEnumerable ? action . ReturnType . Generics . First ( ) . Type : action . ReturnType ;
104
104
ModelTransferObject returnModel = returnModelType as ModelTransferObject ?? transferObjects . OfType < ModelTransferObject > ( ) . FirstOrDefault ( x => x . Equals ( returnModelType ) ) ;
105
105
this . AddUsing ( action . ReturnType , classTemplate , configuration , relativeModelPath ) ;
106
+ TypeTemplate aliasType = null ;
107
+ if ( returnType . Name == "unknown" )
108
+ {
109
+ aliasType = Code . Type ( "TDefault" ) ;
110
+ returnType = aliasType ;
111
+ }
106
112
MethodTemplate methodTemplate = classTemplate . AddMethod ( action . Name , Code . Generic ( "Observable" , returnType ) )
107
113
. FormatName ( configuration ) ;
114
+ if ( aliasType != null )
115
+ {
116
+ methodTemplate . WithGeneric ( aliasType . Name , Code . Type ( "unknown" ) ) ;
117
+ }
108
118
TypeTemplate subjectType = Code . Generic ( "Subject" , returnType ) ;
109
119
methodTemplate . WithCode ( Code . Declare ( subjectType , subjectName , Code . New ( subjectType ) ) ) ;
110
120
foreach ( HttpServiceActionParameterTransferObject parameter in action . Parameters )
@@ -269,7 +279,6 @@ public virtual void Write(AngularWriteConfiguration configuration, List<ITransfe
269
279
{
270
280
parameters . Add ( Code . Local ( action . Parameters . Single ( x => x . FromBody ) . Name ) ) ;
271
281
}
272
- parameters . AddRange ( inlineParameters . Concat ( urlDirectParameters ) . Concat ( urlParameters ) . Select ( parameter => Code . Local ( parameter . Name ) ) ) ;
273
282
if ( actionTypeOptions [ action . Type ] ? . HasHttpOptions ?? false )
274
283
{
275
284
parameters . Add ( Code . Local ( "httpOptions" ) ) ;
0 commit comments