fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

dev: add response type

+10 -2
+10 -2
packages/openapi-ts/src/plugins/@angular/common/shared/node.ts
··· 219 219 role: 'data', 220 220 tool: 'typescript', 221 221 }); 222 + const symbolResponseType = plugin.querySymbol({ 223 + category: 'type', 224 + resource: 'operation', 225 + resourceId: operation.id, 226 + role: 'response', 227 + }); 222 228 223 229 return node 224 230 .param('options', (p) => ··· 229 235 ), 230 236 ) 231 237 .generic('ThrowOnError', (g) => g.extends('boolean').default(false)) 232 - .returns($.type(symbolHttpRequest).generic('unknown')) 238 + .returns($.type(symbolHttpRequest).generic(symbolResponseType ?? 'unknown')) 233 239 .do( 234 240 $.return( 235 241 $('options') ··· 243 249 .prop('method', $.literal(operation.method.toUpperCase())) 244 250 .prop('url', $.literal(operation.path)) 245 251 .spread('options'), 246 - ), 252 + ) 253 + .generic(symbolResponseType ?? 'unknown') 254 + .generic('ThrowOnError'), 247 255 ), 248 256 ) as T; 249 257 }