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.

Merge branch 'main' into fix/ref-parser-max-stack

authored by

Lubos and committed by
GitHub
fe3dba69 072a9ae7

+439 -372
+5
.changeset/fix-nuxt-async-data-options.md
··· 1 + --- 2 + "@hey-api/openapi-ts": patch 3 + --- 4 + 5 + **plugin(@hey-api/client-nuxt)**: fix: forward `asyncDataOptions` to `useFetch` and `useLazyFetch`
+5
.changeset/rude-wolves-pump.md
··· 1 + --- 2 + "@hey-api/openapi-ts": patch 3 + --- 4 + 5 + **plugin(@angular/common)**: use generics for HttpRequests
+33 -33
examples/openapi-ts-angular-common/src/client/@angular/common.gen.ts
··· 48 48 */ 49 49 export const addPetRequest = <ThrowOnError extends boolean = false>( 50 50 options: Options<AddPetData, ThrowOnError>, 51 - ): HttpRequest<unknown> => 52 - (options?.client ?? client).requestOptions({ 51 + ): HttpRequest<AddPetResponse> => 52 + (options?.client ?? client).requestOptions<AddPetResponse, ThrowOnError>({ 53 53 method: 'POST', 54 54 responseStyle: 'data', 55 55 url: '/pet', ··· 63 63 */ 64 64 export const updatePetRequest = <ThrowOnError extends boolean = false>( 65 65 options: Options<UpdatePetData, ThrowOnError>, 66 - ): HttpRequest<unknown> => 67 - (options?.client ?? client).requestOptions({ 66 + ): HttpRequest<UpdatePetResponse> => 67 + (options?.client ?? client).requestOptions<UpdatePetResponse, ThrowOnError>({ 68 68 method: 'PUT', 69 69 responseStyle: 'data', 70 70 url: '/pet', ··· 78 78 */ 79 79 export const findPetsByStatusRequest = <ThrowOnError extends boolean = false>( 80 80 options: Options<FindPetsByStatusData, ThrowOnError>, 81 - ): HttpRequest<unknown> => 82 - (options?.client ?? client).requestOptions({ 81 + ): HttpRequest<FindPetsByStatusResponse> => 82 + (options?.client ?? client).requestOptions<FindPetsByStatusResponse, ThrowOnError>({ 83 83 method: 'GET', 84 84 responseStyle: 'data', 85 85 url: '/pet/findByStatus', ··· 93 93 */ 94 94 export const findPetsByTagsRequest = <ThrowOnError extends boolean = false>( 95 95 options: Options<FindPetsByTagsData, ThrowOnError>, 96 - ): HttpRequest<unknown> => 97 - (options?.client ?? client).requestOptions({ 96 + ): HttpRequest<FindPetsByTagsResponse> => 97 + (options?.client ?? client).requestOptions<FindPetsByTagsResponse, ThrowOnError>({ 98 98 method: 'GET', 99 99 responseStyle: 'data', 100 100 url: '/pet/findByTags', ··· 109 109 export const deletePetRequest = <ThrowOnError extends boolean = false>( 110 110 options: Options<DeletePetData, ThrowOnError>, 111 111 ): HttpRequest<unknown> => 112 - (options?.client ?? client).requestOptions({ 112 + (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 113 113 method: 'DELETE', 114 114 responseStyle: 'data', 115 115 url: '/pet/{petId}', ··· 123 123 */ 124 124 export const getPetByIdRequest = <ThrowOnError extends boolean = false>( 125 125 options: Options<GetPetByIdData, ThrowOnError>, 126 - ): HttpRequest<unknown> => 127 - (options?.client ?? client).requestOptions({ 126 + ): HttpRequest<GetPetByIdResponse> => 127 + (options?.client ?? client).requestOptions<GetPetByIdResponse, ThrowOnError>({ 128 128 method: 'GET', 129 129 responseStyle: 'data', 130 130 url: '/pet/{petId}', ··· 138 138 */ 139 139 export const updatePetWithFormRequest = <ThrowOnError extends boolean = false>( 140 140 options: Options<UpdatePetWithFormData, ThrowOnError>, 141 - ): HttpRequest<unknown> => 142 - (options?.client ?? client).requestOptions({ 141 + ): HttpRequest<UpdatePetWithFormResponse> => 142 + (options?.client ?? client).requestOptions<UpdatePetWithFormResponse, ThrowOnError>({ 143 143 method: 'POST', 144 144 responseStyle: 'data', 145 145 url: '/pet/{petId}', ··· 153 153 */ 154 154 export const uploadFileRequest = <ThrowOnError extends boolean = false>( 155 155 options: Options<UploadFileData, ThrowOnError>, 156 - ): HttpRequest<unknown> => 157 - (options?.client ?? client).requestOptions({ 156 + ): HttpRequest<UploadFileResponse> => 157 + (options?.client ?? client).requestOptions<UploadFileResponse, ThrowOnError>({ 158 158 method: 'POST', 159 159 responseStyle: 'data', 160 160 url: '/pet/{petId}/uploadImage', ··· 168 168 */ 169 169 export const getInventoryRequest = <ThrowOnError extends boolean = false>( 170 170 options?: Options<GetInventoryData, ThrowOnError>, 171 - ): HttpRequest<unknown> => 172 - (options?.client ?? client).requestOptions({ 171 + ): HttpRequest<GetInventoryResponse> => 172 + (options?.client ?? client).requestOptions<GetInventoryResponse, ThrowOnError>({ 173 173 method: 'GET', 174 174 responseStyle: 'data', 175 175 url: '/store/inventory', ··· 183 183 */ 184 184 export const placeOrderRequest = <ThrowOnError extends boolean = false>( 185 185 options?: Options<PlaceOrderData, ThrowOnError>, 186 - ): HttpRequest<unknown> => 187 - (options?.client ?? client).requestOptions({ 186 + ): HttpRequest<PlaceOrderResponse> => 187 + (options?.client ?? client).requestOptions<PlaceOrderResponse, ThrowOnError>({ 188 188 method: 'POST', 189 189 responseStyle: 'data', 190 190 url: '/store/order', ··· 199 199 export const deleteOrderRequest = <ThrowOnError extends boolean = false>( 200 200 options: Options<DeleteOrderData, ThrowOnError>, 201 201 ): HttpRequest<unknown> => 202 - (options?.client ?? client).requestOptions({ 202 + (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 203 203 method: 'DELETE', 204 204 responseStyle: 'data', 205 205 url: '/store/order/{orderId}', ··· 213 213 */ 214 214 export const getOrderByIdRequest = <ThrowOnError extends boolean = false>( 215 215 options: Options<GetOrderByIdData, ThrowOnError>, 216 - ): HttpRequest<unknown> => 217 - (options?.client ?? client).requestOptions({ 216 + ): HttpRequest<GetOrderByIdResponse> => 217 + (options?.client ?? client).requestOptions<GetOrderByIdResponse, ThrowOnError>({ 218 218 method: 'GET', 219 219 responseStyle: 'data', 220 220 url: '/store/order/{orderId}', ··· 228 228 */ 229 229 export const createUserRequest = <ThrowOnError extends boolean = false>( 230 230 options?: Options<CreateUserData, ThrowOnError>, 231 - ): HttpRequest<unknown> => 232 - (options?.client ?? client).requestOptions({ 231 + ): HttpRequest<CreateUserResponse> => 232 + (options?.client ?? client).requestOptions<CreateUserResponse, ThrowOnError>({ 233 233 method: 'POST', 234 234 responseStyle: 'data', 235 235 url: '/user', ··· 243 243 */ 244 244 export const createUsersWithListInputRequest = <ThrowOnError extends boolean = false>( 245 245 options?: Options<CreateUsersWithListInputData, ThrowOnError>, 246 - ): HttpRequest<unknown> => 247 - (options?.client ?? client).requestOptions({ 246 + ): HttpRequest<CreateUsersWithListInputResponse> => 247 + (options?.client ?? client).requestOptions<CreateUsersWithListInputResponse, ThrowOnError>({ 248 248 method: 'POST', 249 249 responseStyle: 'data', 250 250 url: '/user/createWithList', ··· 258 258 */ 259 259 export const loginUserRequest = <ThrowOnError extends boolean = false>( 260 260 options?: Options<LoginUserData, ThrowOnError>, 261 - ): HttpRequest<unknown> => 262 - (options?.client ?? client).requestOptions({ 261 + ): HttpRequest<LoginUserResponse> => 262 + (options?.client ?? client).requestOptions<LoginUserResponse, ThrowOnError>({ 263 263 method: 'GET', 264 264 responseStyle: 'data', 265 265 url: '/user/login', ··· 274 274 export const logoutUserRequest = <ThrowOnError extends boolean = false>( 275 275 options?: Options<LogoutUserData, ThrowOnError>, 276 276 ): HttpRequest<unknown> => 277 - (options?.client ?? client).requestOptions({ 277 + (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 278 278 method: 'GET', 279 279 responseStyle: 'data', 280 280 url: '/user/logout', ··· 289 289 export const deleteUserRequest = <ThrowOnError extends boolean = false>( 290 290 options: Options<DeleteUserData, ThrowOnError>, 291 291 ): HttpRequest<unknown> => 292 - (options?.client ?? client).requestOptions({ 292 + (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 293 293 method: 'DELETE', 294 294 responseStyle: 'data', 295 295 url: '/user/{username}', ··· 303 303 */ 304 304 export const getUserByNameRequest = <ThrowOnError extends boolean = false>( 305 305 options: Options<GetUserByNameData, ThrowOnError>, 306 - ): HttpRequest<unknown> => 307 - (options?.client ?? client).requestOptions({ 306 + ): HttpRequest<GetUserByNameResponse> => 307 + (options?.client ?? client).requestOptions<GetUserByNameResponse, ThrowOnError>({ 308 308 method: 'GET', 309 309 responseStyle: 'data', 310 310 url: '/user/{username}', ··· 319 319 export const updateUserRequest = <ThrowOnError extends boolean = false>( 320 320 options: Options<UpdateUserData, ThrowOnError>, 321 321 ): HttpRequest<unknown> => 322 - (options?.client ?? client).requestOptions({ 322 + (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 323 323 method: 'PUT', 324 324 responseStyle: 'data', 325 325 url: '/user/{username}',
+2 -1
examples/openapi-ts-angular-common/src/client/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
examples/openapi-ts-angular-common/src/client/client/types.gen.ts
··· 169 169 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 170 170 171 171 type RequestOptionsFn = < 172 + T, 172 173 ThrowOnError extends boolean = false, 173 174 TResponseStyle extends ResponseStyle = 'fields', 174 175 >( 175 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 176 - ) => HttpRequest<unknown>; 176 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 177 + ) => HttpRequest<T>; 177 178 178 179 type BuildUrlFn = < 179 180 TData extends {
+2 -1
examples/openapi-ts-angular/src/client/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
examples/openapi-ts-angular/src/client/client/types.gen.ts
··· 169 169 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 170 170 171 171 type RequestOptionsFn = < 172 + T, 172 173 ThrowOnError extends boolean = false, 173 174 TResponseStyle extends ResponseStyle = 'fields', 174 175 >( 175 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 176 - ) => HttpRequest<unknown>; 176 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 177 + ) => HttpRequest<T>; 177 178 178 179 type BuildUrlFn = < 179 180 TData extends {
+2 -1
examples/openapi-ts-tanstack-angular-query-experimental/src/client/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
examples/openapi-ts-tanstack-angular-query-experimental/src/client/client/types.gen.ts
··· 169 169 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 170 170 171 171 type RequestOptionsFn = < 172 + T, 172 173 ThrowOnError extends boolean = false, 173 174 TResponseStyle extends ResponseStyle = 'fields', 174 175 >( 175 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 176 - ) => HttpRequest<unknown>; 176 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 177 + ) => HttpRequest<T>; 177 178 178 179 type BuildUrlFn = < 179 180 TData extends {
-1
packages/openapi-ts-tests/main/package.json
··· 4 4 "private": true, 5 5 "type": "module", 6 6 "scripts": { 7 - "test:types": "tsc -p tsconfig.test.json --noEmit", 8 7 "typecheck": "tsc --noEmit" 9 8 }, 10 9 "devDependencies": {
+47 -47
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts
··· 10 10 @Injectable({ providedIn: 'root' }) 11 11 export class DefaultServiceRequests { 12 12 public serviceWithEmptyTag<ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>): HttpRequest<unknown> { 13 - return (options?.client ?? client).requestOptions({ 13 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 14 14 responseStyle: 'data', 15 15 method: 'GET', 16 16 url: '/api/v{api-version}/no+tag', ··· 19 19 } 20 20 21 21 public patchApiVbyApiVersionNoTag<ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> { 22 - return (options?.client ?? client).requestOptions({ 22 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 23 23 responseStyle: 'data', 24 24 method: 'PATCH', 25 25 url: '/api/v{api-version}/no+tag', ··· 28 28 } 29 29 30 30 public fooWow<ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> { 31 - return (options?.client ?? client).requestOptions({ 31 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 32 32 responseStyle: 'data', 33 33 method: 'PUT', 34 34 url: '/api/v{api-version}/no+tag', ··· 41 41 * 42 42 * Body should not be unknown 43 43 */ 44 - public postApiVbyApiVersionBody<ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>): HttpRequest<unknown> { 45 - return (options?.client ?? client).requestOptions({ 44 + public postApiVbyApiVersionBody<ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>): HttpRequest<PostApiVbyApiVersionBodyResponse> { 45 + return (options?.client ?? client).requestOptions<PostApiVbyApiVersionBodyResponse, ThrowOnError>({ 46 46 responseStyle: 'data', 47 47 method: 'POST', 48 48 url: '/api/v{api-version}/body', ··· 54 54 @Injectable({ providedIn: 'root' }) 55 55 export class SimpleServiceRequests { 56 56 public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 57 - return (options?.client ?? client).requestOptions({ 57 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 58 58 responseStyle: 'data', 59 59 method: 'DELETE', 60 60 url: '/api/v{api-version}/simple', ··· 63 63 } 64 64 65 65 public getCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 66 - return (options?.client ?? client).requestOptions({ 66 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 67 67 responseStyle: 'data', 68 68 method: 'GET', 69 69 url: '/api/v{api-version}/simple', ··· 72 72 } 73 73 74 74 public headCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 75 - return (options?.client ?? client).requestOptions({ 75 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 76 76 responseStyle: 'data', 77 77 method: 'HEAD', 78 78 url: '/api/v{api-version}/simple', ··· 81 81 } 82 82 83 83 public optionsCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 84 - return (options?.client ?? client).requestOptions({ 84 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 85 85 responseStyle: 'data', 86 86 method: 'OPTIONS', 87 87 url: '/api/v{api-version}/simple', ··· 90 90 } 91 91 92 92 public patchCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 93 - return (options?.client ?? client).requestOptions({ 93 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 94 94 responseStyle: 'data', 95 95 method: 'PATCH', 96 96 url: '/api/v{api-version}/simple', ··· 99 99 } 100 100 101 101 public postCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 102 - return (options?.client ?? client).requestOptions({ 102 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 103 103 responseStyle: 'data', 104 104 method: 'POST', 105 105 url: '/api/v{api-version}/simple', ··· 108 108 } 109 109 110 110 public putCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 111 - return (options?.client ?? client).requestOptions({ 111 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 112 112 responseStyle: 'data', 113 113 method: 'PUT', 114 114 url: '/api/v{api-version}/simple', ··· 120 120 @Injectable({ providedIn: 'root' }) 121 121 export class DescriptionsServiceRequests { 122 122 public callWithDescriptions<ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> { 123 - return (options?.client ?? client).requestOptions({ 123 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 124 124 responseStyle: 'data', 125 125 method: 'POST', 126 126 url: '/api/v{api-version}/descriptions/', ··· 132 132 @Injectable({ providedIn: 'root' }) 133 133 export class ParametersServiceRequests { 134 134 public callWithParameters<ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> { 135 - return (options?.client ?? client).requestOptions({ 135 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 136 136 responseStyle: 'data', 137 137 method: 'POST', 138 138 url: '/api/v{api-version}/parameters/{parameterPath}', ··· 141 141 } 142 142 143 143 public callWithWeirdParameterNames<ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> { 144 - return (options?.client ?? client).requestOptions({ 144 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 145 145 responseStyle: 'data', 146 146 method: 'POST', 147 147 url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', ··· 153 153 @Injectable({ providedIn: 'root' }) 154 154 export class DefaultsServiceRequests { 155 155 public callWithDefaultParameters<ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> { 156 - return (options?.client ?? client).requestOptions({ 156 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 157 157 responseStyle: 'data', 158 158 method: 'GET', 159 159 url: '/api/v{api-version}/defaults', ··· 162 162 } 163 163 164 164 public callWithDefaultOptionalParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> { 165 - return (options?.client ?? client).requestOptions({ 165 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 166 166 responseStyle: 'data', 167 167 method: 'POST', 168 168 url: '/api/v{api-version}/defaults', ··· 171 171 } 172 172 173 173 public callToTestOrderOfParams<ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> { 174 - return (options?.client ?? client).requestOptions({ 174 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 175 175 responseStyle: 'data', 176 176 method: 'PUT', 177 177 url: '/api/v{api-version}/defaults', ··· 183 183 @Injectable({ providedIn: 'root' }) 184 184 export class DuplicateServiceRequests { 185 185 public duplicateName<ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> { 186 - return (options?.client ?? client).requestOptions({ 186 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 187 187 responseStyle: 'data', 188 188 method: 'DELETE', 189 189 url: '/api/v{api-version}/duplicate', ··· 192 192 } 193 193 194 194 public duplicateName2<ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> { 195 - return (options?.client ?? client).requestOptions({ 195 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 196 196 responseStyle: 'data', 197 197 method: 'GET', 198 198 url: '/api/v{api-version}/duplicate', ··· 201 201 } 202 202 203 203 public duplicateName3<ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> { 204 - return (options?.client ?? client).requestOptions({ 204 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 205 205 responseStyle: 'data', 206 206 method: 'POST', 207 207 url: '/api/v{api-version}/duplicate', ··· 210 210 } 211 211 212 212 public duplicateName4<ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> { 213 - return (options?.client ?? client).requestOptions({ 213 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 214 214 responseStyle: 'data', 215 215 method: 'PUT', 216 216 url: '/api/v{api-version}/duplicate', ··· 222 222 @Injectable({ providedIn: 'root' }) 223 223 export class NoContentServiceRequests { 224 224 public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 225 - return (options?.client ?? client).requestOptions({ 225 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 226 226 responseStyle: 'data', 227 227 method: 'GET', 228 228 url: '/api/v{api-version}/no-content', ··· 230 230 }); 231 231 } 232 232 233 - public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 234 - return (options?.client ?? client).requestOptions({ 233 + public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<CallWithResponseAndNoContentResponseResponse> { 234 + return (options?.client ?? client).requestOptions<CallWithResponseAndNoContentResponseResponse, ThrowOnError>({ 235 235 responseStyle: 'data', 236 236 method: 'GET', 237 237 url: '/api/v{api-version}/multiple-tags/response-and-no-content', ··· 242 242 243 243 @Injectable({ providedIn: 'root' }) 244 244 export class ResponseServiceRequests { 245 - public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 246 - return (options?.client ?? client).requestOptions({ 245 + public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<CallWithResponseAndNoContentResponseResponse> { 246 + return (options?.client ?? client).requestOptions<CallWithResponseAndNoContentResponseResponse, ThrowOnError>({ 247 247 responseStyle: 'data', 248 248 method: 'GET', 249 249 url: '/api/v{api-version}/multiple-tags/response-and-no-content', ··· 251 251 }); 252 252 } 253 253 254 - public callWithResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<unknown> { 255 - return (options?.client ?? client).requestOptions({ 254 + public callWithResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<CallWithResponseResponse> { 255 + return (options?.client ?? client).requestOptions<CallWithResponseResponse, ThrowOnError>({ 256 256 responseStyle: 'data', 257 257 method: 'GET', 258 258 url: '/api/v{api-version}/response', ··· 260 260 }); 261 261 } 262 262 263 - public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<unknown> { 264 - return (options?.client ?? client).requestOptions({ 263 + public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<CallWithDuplicateResponsesResponse> { 264 + return (options?.client ?? client).requestOptions<CallWithDuplicateResponsesResponse, ThrowOnError>({ 265 265 responseStyle: 'data', 266 266 method: 'POST', 267 267 url: '/api/v{api-version}/response', ··· 269 269 }); 270 270 } 271 271 272 - public callWithResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<unknown> { 273 - return (options?.client ?? client).requestOptions({ 272 + public callWithResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<CallWithResponsesResponse> { 273 + return (options?.client ?? client).requestOptions<CallWithResponsesResponse, ThrowOnError>({ 274 274 responseStyle: 'data', 275 275 method: 'PUT', 276 276 url: '/api/v{api-version}/response', ··· 282 282 @Injectable({ providedIn: 'root' }) 283 283 export class MultipleTags1ServiceRequests { 284 284 public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> { 285 - return (options?.client ?? client).requestOptions({ 285 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 286 286 responseStyle: 'data', 287 287 method: 'GET', 288 288 url: '/api/v{api-version}/multiple-tags/a', ··· 291 291 } 292 292 293 293 public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 294 - return (options?.client ?? client).requestOptions({ 294 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 295 295 responseStyle: 'data', 296 296 method: 'GET', 297 297 url: '/api/v{api-version}/multiple-tags/b', ··· 303 303 @Injectable({ providedIn: 'root' }) 304 304 export class MultipleTags2ServiceRequests { 305 305 public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> { 306 - return (options?.client ?? client).requestOptions({ 306 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 307 307 responseStyle: 'data', 308 308 method: 'GET', 309 309 url: '/api/v{api-version}/multiple-tags/a', ··· 312 312 } 313 313 314 314 public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 315 - return (options?.client ?? client).requestOptions({ 315 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 316 316 responseStyle: 'data', 317 317 method: 'GET', 318 318 url: '/api/v{api-version}/multiple-tags/b', ··· 324 324 @Injectable({ providedIn: 'root' }) 325 325 export class MultipleTags3ServiceRequests { 326 326 public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 327 - return (options?.client ?? client).requestOptions({ 327 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 328 328 responseStyle: 'data', 329 329 method: 'GET', 330 330 url: '/api/v{api-version}/multiple-tags/b', ··· 336 336 @Injectable({ providedIn: 'root' }) 337 337 export class CollectionFormatServiceRequests { 338 338 public collectionFormat<ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> { 339 - return (options?.client ?? client).requestOptions({ 339 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 340 340 responseStyle: 'data', 341 341 method: 'GET', 342 342 url: '/api/v{api-version}/collectionFormat', ··· 347 347 348 348 @Injectable({ providedIn: 'root' }) 349 349 export class TypesServiceRequests { 350 - public types<ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<unknown> { 351 - return (options?.client ?? client).requestOptions({ 350 + public types<ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<TypesResponse> { 351 + return (options?.client ?? client).requestOptions<TypesResponse, ThrowOnError>({ 352 352 responseStyle: 'data', 353 353 method: 'GET', 354 354 url: '/api/v{api-version}/types', ··· 359 359 360 360 @Injectable({ providedIn: 'root' }) 361 361 export class ComplexServiceRequests { 362 - public complexTypes<ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<unknown> { 363 - return (options?.client ?? client).requestOptions({ 362 + public complexTypes<ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<ComplexTypesResponse> { 363 + return (options?.client ?? client).requestOptions<ComplexTypesResponse, ThrowOnError>({ 364 364 responseStyle: 'data', 365 365 method: 'GET', 366 366 url: '/api/v{api-version}/complex', ··· 372 372 @Injectable({ providedIn: 'root' }) 373 373 export class HeaderServiceRequests { 374 374 public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> { 375 - return (options?.client ?? client).requestOptions({ 375 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 376 376 responseStyle: 'data', 377 377 method: 'POST', 378 378 url: '/api/v{api-version}/header', ··· 384 384 @Injectable({ providedIn: 'root' }) 385 385 export class ErrorServiceRequests { 386 386 public testErrorCode<ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> { 387 - return (options?.client ?? client).requestOptions({ 387 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 388 388 responseStyle: 'data', 389 389 method: 'POST', 390 390 url: '/api/v{api-version}/error', ··· 395 395 396 396 @Injectable({ providedIn: 'root' }) 397 397 export class NonAsciiÆøåÆøÅöôêÊServiceRequests { 398 - public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<unknown> { 399 - return (options?.client ?? client).requestOptions({ 398 + public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<NonAsciiæøåÆøÅöôêÊ字符串Response> { 399 + return (options?.client ?? client).requestOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, ThrowOnError>({ 400 400 responseStyle: 'data', 401 401 method: 'POST', 402 402 url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+74 -74
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts
··· 10 10 @Injectable({ providedIn: 'root' }) 11 11 export class DefaultServiceRequests { 12 12 public export<ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>): HttpRequest<unknown> { 13 - return (options?.client ?? client).requestOptions({ 13 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 14 14 responseStyle: 'data', 15 15 method: 'GET', 16 16 url: '/api/v{api-version}/no+tag', ··· 19 19 } 20 20 21 21 public patchApiVbyApiVersionNoTag<ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> { 22 - return (options?.client ?? client).requestOptions({ 22 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 23 23 responseStyle: 'data', 24 24 method: 'PATCH', 25 25 url: '/api/v{api-version}/no+tag', ··· 27 27 }); 28 28 } 29 29 30 - public import<ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>): HttpRequest<unknown> { 31 - return (options?.client ?? client).requestOptions({ 30 + public import<ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>): HttpRequest<ImportResponse> { 31 + return (options?.client ?? client).requestOptions<ImportResponse, ThrowOnError>({ 32 32 responseStyle: 'data', 33 33 method: 'POST', 34 34 url: '/api/v{api-version}/no+tag', ··· 37 37 } 38 38 39 39 public fooWow<ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> { 40 - return (options?.client ?? client).requestOptions({ 40 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 41 41 responseStyle: 'data', 42 42 method: 'PUT', 43 43 url: '/api/v{api-version}/no+tag', ··· 45 45 }); 46 46 } 47 47 48 - public getApiVbyApiVersionSimpleOperation<ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>): HttpRequest<unknown> { 49 - return (options?.client ?? client).requestOptions({ 48 + public getApiVbyApiVersionSimpleOperation<ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>): HttpRequest<GetApiVbyApiVersionSimpleOperationResponse> { 49 + return (options?.client ?? client).requestOptions<GetApiVbyApiVersionSimpleOperationResponse, ThrowOnError>({ 50 50 responseStyle: 'data', 51 51 method: 'GET', 52 52 url: '/api/v{api-version}/simple:operation', ··· 56 56 } 57 57 58 58 export class ODataControllerService { 59 - public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>): HttpRequest<unknown> { 60 - return (options?.client ?? client).requestOptions({ 59 + public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>): HttpRequest<ApiVVersionODataControllerCountResponse> { 60 + return (options?.client ?? client).requestOptions<ApiVVersionODataControllerCountResponse, ThrowOnError>({ 61 61 responseStyle: 'data', 62 62 method: 'GET', 63 63 url: '/api/v{api-version}/simple/$count', ··· 83 83 @Injectable({ providedIn: 'root' }) 84 84 export class SimpleServiceRequests { 85 85 public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 86 - return (options?.client ?? client).requestOptions({ 86 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 87 87 responseStyle: 'data', 88 88 method: 'DELETE', 89 89 url: '/api/v{api-version}/simple', ··· 92 92 } 93 93 94 94 public getCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 95 - return (options?.client ?? client).requestOptions({ 95 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 96 96 responseStyle: 'data', 97 97 method: 'GET', 98 98 url: '/api/v{api-version}/simple', ··· 101 101 } 102 102 103 103 public headCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 104 - return (options?.client ?? client).requestOptions({ 104 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 105 105 responseStyle: 'data', 106 106 method: 'HEAD', 107 107 url: '/api/v{api-version}/simple', ··· 110 110 } 111 111 112 112 public optionsCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 113 - return (options?.client ?? client).requestOptions({ 113 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 114 114 responseStyle: 'data', 115 115 method: 'OPTIONS', 116 116 url: '/api/v{api-version}/simple', ··· 119 119 } 120 120 121 121 public patchCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 122 - return (options?.client ?? client).requestOptions({ 122 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 123 123 responseStyle: 'data', 124 124 method: 'PATCH', 125 125 url: '/api/v{api-version}/simple', ··· 128 128 } 129 129 130 130 public postCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 131 - return (options?.client ?? client).requestOptions({ 131 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 132 132 responseStyle: 'data', 133 133 method: 'POST', 134 134 url: '/api/v{api-version}/simple', ··· 137 137 } 138 138 139 139 public putCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 140 - return (options?.client ?? client).requestOptions({ 140 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 141 141 responseStyle: 'data', 142 142 method: 'PUT', 143 143 url: '/api/v{api-version}/simple', ··· 154 154 @Injectable({ providedIn: 'root' }) 155 155 export class ParametersServiceRequests { 156 156 public deleteFoo<ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>): HttpRequest<unknown> { 157 - return (options?.client ?? client).requestOptions({ 157 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 158 158 responseStyle: 'data', 159 159 method: 'DELETE', 160 160 url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ··· 163 163 } 164 164 165 165 public callWithParameters<ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> { 166 - return (options?.client ?? client).requestOptions({ 166 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 167 167 responseStyle: 'data', 168 168 method: 'POST', 169 169 url: '/api/v{api-version}/parameters/{parameterPath}', ··· 172 172 } 173 173 174 174 public callWithWeirdParameterNames<ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> { 175 - return (options?.client ?? client).requestOptions({ 175 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 176 176 responseStyle: 'data', 177 177 method: 'POST', 178 178 url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', ··· 181 181 } 182 182 183 183 public getCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> { 184 - return (options?.client ?? client).requestOptions({ 184 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 185 185 responseStyle: 'data', 186 186 method: 'GET', 187 187 url: '/api/v{api-version}/parameters', ··· 189 189 }); 190 190 } 191 191 192 - public postCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> { 193 - return (options?.client ?? client).requestOptions({ 192 + public postCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>): HttpRequest<PostCallWithOptionalParamResponse> { 193 + return (options?.client ?? client).requestOptions<PostCallWithOptionalParamResponse, ThrowOnError>({ 194 194 responseStyle: 'data', 195 195 method: 'POST', 196 196 url: '/api/v{api-version}/parameters', ··· 202 202 @Injectable({ providedIn: 'root' }) 203 203 export class DescriptionsServiceRequests { 204 204 public callWithDescriptions<ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> { 205 - return (options?.client ?? client).requestOptions({ 205 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 206 206 responseStyle: 'data', 207 207 method: 'POST', 208 208 url: '/api/v{api-version}/descriptions', ··· 217 217 * @deprecated 218 218 */ 219 219 public deprecatedCall<ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>): HttpRequest<unknown> { 220 - return (options?.client ?? client).requestOptions({ 220 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 221 221 responseStyle: 'data', 222 222 method: 'POST', 223 223 url: '/api/v{api-version}/parameters/deprecated', ··· 229 229 @Injectable({ providedIn: 'root' }) 230 230 export class RequestBodyServiceRequests { 231 231 public postApiVbyApiVersionRequestBody<ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>): HttpRequest<unknown> { 232 - return (options?.client ?? client).requestOptions({ 232 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 233 233 responseStyle: 'data', 234 234 method: 'POST', 235 235 url: '/api/v{api-version}/requestBody', ··· 241 241 @Injectable({ providedIn: 'root' }) 242 242 export class FormDataServiceRequests { 243 243 public postApiVbyApiVersionFormData<ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>): HttpRequest<unknown> { 244 - return (options?.client ?? client).requestOptions({ 244 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 245 245 responseStyle: 'data', 246 246 method: 'POST', 247 247 url: '/api/v{api-version}/formData', ··· 253 253 @Injectable({ providedIn: 'root' }) 254 254 export class DefaultsServiceRequests { 255 255 public callWithDefaultParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> { 256 - return (options?.client ?? client).requestOptions({ 256 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 257 257 responseStyle: 'data', 258 258 method: 'GET', 259 259 url: '/api/v{api-version}/defaults', ··· 262 262 } 263 263 264 264 public callWithDefaultOptionalParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> { 265 - return (options?.client ?? client).requestOptions({ 265 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 266 266 responseStyle: 'data', 267 267 method: 'POST', 268 268 url: '/api/v{api-version}/defaults', ··· 271 271 } 272 272 273 273 public callToTestOrderOfParams<ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> { 274 - return (options?.client ?? client).requestOptions({ 274 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 275 275 responseStyle: 'data', 276 276 method: 'PUT', 277 277 url: '/api/v{api-version}/defaults', ··· 283 283 @Injectable({ providedIn: 'root' }) 284 284 export class DuplicateServiceRequests { 285 285 public duplicateName<ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> { 286 - return (options?.client ?? client).requestOptions({ 286 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 287 287 responseStyle: 'data', 288 288 method: 'DELETE', 289 289 url: '/api/v{api-version}/duplicate', ··· 292 292 } 293 293 294 294 public duplicateName2<ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> { 295 - return (options?.client ?? client).requestOptions({ 295 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 296 296 responseStyle: 'data', 297 297 method: 'GET', 298 298 url: '/api/v{api-version}/duplicate', ··· 301 301 } 302 302 303 303 public duplicateName3<ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> { 304 - return (options?.client ?? client).requestOptions({ 304 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 305 305 responseStyle: 'data', 306 306 method: 'POST', 307 307 url: '/api/v{api-version}/duplicate', ··· 310 310 } 311 311 312 312 public duplicateName4<ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> { 313 - return (options?.client ?? client).requestOptions({ 313 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 314 314 responseStyle: 'data', 315 315 method: 'PUT', 316 316 url: '/api/v{api-version}/duplicate', ··· 321 321 322 322 @Injectable({ providedIn: 'root' }) 323 323 export class NoContentServiceRequests { 324 - public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 325 - return (options?.client ?? client).requestOptions({ 324 + public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<CallWithNoContentResponseResponse> { 325 + return (options?.client ?? client).requestOptions<CallWithNoContentResponseResponse, ThrowOnError>({ 326 326 responseStyle: 'data', 327 327 method: 'GET', 328 328 url: '/api/v{api-version}/no-content', ··· 330 330 }); 331 331 } 332 332 333 - public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 334 - return (options?.client ?? client).requestOptions({ 333 + public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<CallWithResponseAndNoContentResponseResponse> { 334 + return (options?.client ?? client).requestOptions<CallWithResponseAndNoContentResponseResponse, ThrowOnError>({ 335 335 responseStyle: 'data', 336 336 method: 'GET', 337 337 url: '/api/v{api-version}/multiple-tags/response-and-no-content', ··· 342 342 343 343 @Injectable({ providedIn: 'root' }) 344 344 export class ResponseServiceRequests { 345 - public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 346 - return (options?.client ?? client).requestOptions({ 345 + public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<CallWithResponseAndNoContentResponseResponse> { 346 + return (options?.client ?? client).requestOptions<CallWithResponseAndNoContentResponseResponse, ThrowOnError>({ 347 347 responseStyle: 'data', 348 348 method: 'GET', 349 349 url: '/api/v{api-version}/multiple-tags/response-and-no-content', ··· 351 351 }); 352 352 } 353 353 354 - public callWithResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<unknown> { 355 - return (options?.client ?? client).requestOptions({ 354 + public callWithResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<CallWithResponseResponse> { 355 + return (options?.client ?? client).requestOptions<CallWithResponseResponse, ThrowOnError>({ 356 356 responseStyle: 'data', 357 357 method: 'GET', 358 358 url: '/api/v{api-version}/response', ··· 360 360 }); 361 361 } 362 362 363 - public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<unknown> { 364 - return (options?.client ?? client).requestOptions({ 363 + public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<CallWithDuplicateResponsesResponse> { 364 + return (options?.client ?? client).requestOptions<CallWithDuplicateResponsesResponse, ThrowOnError>({ 365 365 responseStyle: 'data', 366 366 method: 'POST', 367 367 url: '/api/v{api-version}/response', ··· 369 369 }); 370 370 } 371 371 372 - public callWithResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<unknown> { 373 - return (options?.client ?? client).requestOptions({ 372 + public callWithResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<CallWithResponsesResponse> { 373 + return (options?.client ?? client).requestOptions<CallWithResponsesResponse, ThrowOnError>({ 374 374 responseStyle: 'data', 375 375 method: 'PUT', 376 376 url: '/api/v{api-version}/response', ··· 381 381 382 382 @Injectable({ providedIn: 'root' }) 383 383 export class MultipleTags1ServiceRequests { 384 - public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> { 385 - return (options?.client ?? client).requestOptions({ 384 + public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<DummyAResponse> { 385 + return (options?.client ?? client).requestOptions<DummyAResponse, ThrowOnError>({ 386 386 responseStyle: 'data', 387 387 method: 'GET', 388 388 url: '/api/v{api-version}/multiple-tags/a', ··· 390 390 }); 391 391 } 392 392 393 - public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 394 - return (options?.client ?? client).requestOptions({ 393 + public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<DummyBResponse> { 394 + return (options?.client ?? client).requestOptions<DummyBResponse, ThrowOnError>({ 395 395 responseStyle: 'data', 396 396 method: 'GET', 397 397 url: '/api/v{api-version}/multiple-tags/b', ··· 402 402 403 403 @Injectable({ providedIn: 'root' }) 404 404 export class MultipleTags2ServiceRequests { 405 - public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> { 406 - return (options?.client ?? client).requestOptions({ 405 + public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<DummyAResponse> { 406 + return (options?.client ?? client).requestOptions<DummyAResponse, ThrowOnError>({ 407 407 responseStyle: 'data', 408 408 method: 'GET', 409 409 url: '/api/v{api-version}/multiple-tags/a', ··· 411 411 }); 412 412 } 413 413 414 - public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 415 - return (options?.client ?? client).requestOptions({ 414 + public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<DummyBResponse> { 415 + return (options?.client ?? client).requestOptions<DummyBResponse, ThrowOnError>({ 416 416 responseStyle: 'data', 417 417 method: 'GET', 418 418 url: '/api/v{api-version}/multiple-tags/b', ··· 423 423 424 424 @Injectable({ providedIn: 'root' }) 425 425 export class MultipleTags3ServiceRequests { 426 - public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 427 - return (options?.client ?? client).requestOptions({ 426 + public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<DummyBResponse> { 427 + return (options?.client ?? client).requestOptions<DummyBResponse, ThrowOnError>({ 428 428 responseStyle: 'data', 429 429 method: 'GET', 430 430 url: '/api/v{api-version}/multiple-tags/b', ··· 436 436 @Injectable({ providedIn: 'root' }) 437 437 export class CollectionFormatServiceRequests { 438 438 public collectionFormat<ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> { 439 - return (options?.client ?? client).requestOptions({ 439 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 440 440 responseStyle: 'data', 441 441 method: 'GET', 442 442 url: '/api/v{api-version}/collectionFormat', ··· 447 447 448 448 @Injectable({ providedIn: 'root' }) 449 449 export class TypesServiceRequests { 450 - public types<ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<unknown> { 451 - return (options?.client ?? client).requestOptions({ 450 + public types<ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<TypesResponse> { 451 + return (options?.client ?? client).requestOptions<TypesResponse, ThrowOnError>({ 452 452 responseStyle: 'data', 453 453 method: 'GET', 454 454 url: '/api/v{api-version}/types', ··· 459 459 460 460 @Injectable({ providedIn: 'root' }) 461 461 export class UploadServiceRequests { 462 - public uploadFile<ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): HttpRequest<unknown> { 463 - return (options?.client ?? client).requestOptions({ 462 + public uploadFile<ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): HttpRequest<UploadFileResponse> { 463 + return (options?.client ?? client).requestOptions<UploadFileResponse, ThrowOnError>({ 464 464 responseStyle: 'data', 465 465 method: 'POST', 466 466 url: '/api/v{api-version}/upload', ··· 471 471 472 472 @Injectable({ providedIn: 'root' }) 473 473 export class FileResponseServiceRequests { 474 - public fileResponse<ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>): HttpRequest<unknown> { 475 - return (options?.client ?? client).requestOptions({ 474 + public fileResponse<ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>): HttpRequest<FileResponseResponse> { 475 + return (options?.client ?? client).requestOptions<FileResponseResponse, ThrowOnError>({ 476 476 responseStyle: 'data', 477 477 method: 'GET', 478 478 url: '/api/v{api-version}/file/{id}', ··· 483 483 484 484 @Injectable({ providedIn: 'root' }) 485 485 export class ComplexServiceRequests { 486 - public complexTypes<ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<unknown> { 487 - return (options?.client ?? client).requestOptions({ 486 + public complexTypes<ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<ComplexTypesResponse> { 487 + return (options?.client ?? client).requestOptions<ComplexTypesResponse, ThrowOnError>({ 488 488 responseStyle: 'data', 489 489 method: 'GET', 490 490 url: '/api/v{api-version}/complex', ··· 492 492 }); 493 493 } 494 494 495 - public complexParams<ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>): HttpRequest<unknown> { 496 - return (options?.client ?? client).requestOptions({ 495 + public complexParams<ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>): HttpRequest<ComplexParamsResponse> { 496 + return (options?.client ?? client).requestOptions<ComplexParamsResponse, ThrowOnError>({ 497 497 responseStyle: 'data', 498 498 method: 'PUT', 499 499 url: '/api/v{api-version}/complex/{id}', ··· 504 504 505 505 @Injectable({ providedIn: 'root' }) 506 506 export class MultipartServiceRequests { 507 - public multipartResponse<ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>): HttpRequest<unknown> { 508 - return (options?.client ?? client).requestOptions({ 507 + public multipartResponse<ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>): HttpRequest<MultipartResponseResponse> { 508 + return (options?.client ?? client).requestOptions<MultipartResponseResponse, ThrowOnError>({ 509 509 responseStyle: 'data', 510 510 method: 'GET', 511 511 url: '/api/v{api-version}/multipart', ··· 514 514 } 515 515 516 516 public multipartRequest<ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>): HttpRequest<unknown> { 517 - return (options?.client ?? client).requestOptions({ 517 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 518 518 responseStyle: 'data', 519 519 method: 'POST', 520 520 url: '/api/v{api-version}/multipart', ··· 526 526 @Injectable({ providedIn: 'root' }) 527 527 export class HeaderServiceRequests { 528 528 public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> { 529 - return (options?.client ?? client).requestOptions({ 529 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 530 530 responseStyle: 'data', 531 531 method: 'POST', 532 532 url: '/api/v{api-version}/header', ··· 538 538 @Injectable({ providedIn: 'root' }) 539 539 export class ErrorServiceRequests { 540 540 public testErrorCode<ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> { 541 - return (options?.client ?? client).requestOptions({ 541 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 542 542 responseStyle: 'data', 543 543 method: 'POST', 544 544 url: '/api/v{api-version}/error', ··· 549 549 550 550 @Injectable({ providedIn: 'root' }) 551 551 export class NonAsciiÆøåÆøÅöôêÊServiceRequests { 552 - public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<unknown> { 553 - return (options?.client ?? client).requestOptions({ 552 + public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<NonAsciiæøåÆøÅöôêÊ字符串Response> { 553 + return (options?.client ?? client).requestOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, ThrowOnError>({ 554 554 responseStyle: 'data', 555 555 method: 'POST', 556 556 url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ··· 562 562 * Login User 563 563 */ 564 564 public putWithFormUrlEncoded<ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>): HttpRequest<unknown> { 565 - return (options?.client ?? client).requestOptions({ 565 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 566 566 responseStyle: 'data', 567 567 method: 'PUT', 568 568 url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts
··· 144 144 body.value = serializeBody(changed); 145 145 }); 146 146 return composable === 'useLazyFetch' 147 - ? useLazyFetch(() => buildUrl(opts), opts) 148 - : useFetch(() => buildUrl(opts), opts); 147 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 148 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 149 149 } 150 150 151 151 const handler: any = () =>
+2 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts
··· 144 144 body.value = serializeBody(changed); 145 145 }); 146 146 return composable === 'useLazyFetch' 147 - ? useLazyFetch(() => buildUrl(opts), opts) 148 - : useFetch(() => buildUrl(opts), opts); 147 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 148 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 149 149 } 150 150 151 151 const handler: any = () =>
+2 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts
··· 144 144 body.value = serializeBody(changed); 145 145 }); 146 146 return composable === 'useLazyFetch' 147 - ? useLazyFetch(() => buildUrl(opts), opts) 148 - : useFetch(() => buildUrl(opts), opts); 147 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 148 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 149 149 } 150 150 151 151 const handler: any = () =>
+2 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts
··· 144 144 body.value = serializeBody(changed); 145 145 }); 146 146 return composable === 'useLazyFetch' 147 - ? useLazyFetch(() => buildUrl(opts), opts) 148 - : useFetch(() => buildUrl(opts), opts); 147 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 148 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 149 149 } 150 150 151 151 const handler: any = () =>
+2 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts
··· 144 144 body.value = serializeBody(changed); 145 145 }); 146 146 return composable === 'useLazyFetch' 147 - ? useLazyFetch(() => buildUrl(opts), opts) 148 - : useFetch(() => buildUrl(opts), opts); 147 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 148 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 149 149 } 150 150 151 151 const handler: any = () =>
+2 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts
··· 144 144 body.value = serializeBody(changed); 145 145 }); 146 146 return composable === 'useLazyFetch' 147 - ? useLazyFetch(() => buildUrl(opts), opts) 148 - : useFetch(() => buildUrl(opts), opts); 147 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 148 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 149 149 } 150 150 151 151 const handler: any = () =>
+2 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/client/client.gen.ts
··· 144 144 body.value = serializeBody(changed); 145 145 }); 146 146 return composable === 'useLazyFetch' 147 - ? useLazyFetch(() => buildUrl(opts), opts) 148 - : useFetch(() => buildUrl(opts), opts); 147 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 148 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 149 149 } 150 150 151 151 const handler: any = () =>
+2 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts
··· 144 144 body.value = serializeBody(changed); 145 145 }); 146 146 return composable === 'useLazyFetch' 147 - ? useLazyFetch(() => buildUrl(opts), opts) 148 - : useFetch(() => buildUrl(opts), opts); 147 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 148 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 149 149 } 150 150 151 151 const handler: any = () =>
+2 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts
··· 144 144 body.value = serializeBody(changed); 145 145 }); 146 146 return composable === 'useLazyFetch' 147 - ? useLazyFetch(() => buildUrl(opts), opts) 148 - : useFetch(() => buildUrl(opts), opts); 147 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 148 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 149 149 } 150 150 151 151 const handler: any = () =>
+2 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/client/client.gen.ts
··· 144 144 body.value = serializeBody(changed); 145 145 }); 146 146 return composable === 'useLazyFetch' 147 - ? useLazyFetch(() => buildUrl(opts), opts) 148 - : useFetch(() => buildUrl(opts), opts); 147 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 148 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 149 149 } 150 150 151 151 const handler: any = () =>
+2 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts
··· 144 144 body.value = serializeBody(changed); 145 145 }); 146 146 return composable === 'useLazyFetch' 147 - ? useLazyFetch(() => buildUrl(opts), opts) 148 - : useFetch(() => buildUrl(opts), opts); 147 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 148 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 149 149 } 150 150 151 151 const handler: any = () =>
+75 -75
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/@angular/common.gen.ts
··· 10 10 @Injectable({ providedIn: 'root' }) 11 11 export class DefaultServiceRequests { 12 12 public export<ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>): HttpRequest<unknown> { 13 - return (options?.client ?? client).requestOptions({ 13 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 14 14 responseStyle: 'data', 15 15 method: 'GET', 16 16 url: '/api/v{api-version}/no+tag', ··· 19 19 } 20 20 21 21 public patchApiVbyApiVersionNoTag<ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> { 22 - return (options?.client ?? client).requestOptions({ 22 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 23 23 responseStyle: 'data', 24 24 method: 'PATCH', 25 25 url: '/api/v{api-version}/no+tag', ··· 27 27 }); 28 28 } 29 29 30 - public import<ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>): HttpRequest<unknown> { 31 - return (options?.client ?? client).requestOptions({ 30 + public import<ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>): HttpRequest<ImportResponse> { 31 + return (options?.client ?? client).requestOptions<ImportResponse, ThrowOnError>({ 32 32 responseStyle: 'data', 33 33 method: 'POST', 34 34 url: '/api/v{api-version}/no+tag', ··· 37 37 } 38 38 39 39 public fooWow<ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> { 40 - return (options?.client ?? client).requestOptions({ 40 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 41 41 responseStyle: 'data', 42 42 method: 'PUT', 43 43 url: '/api/v{api-version}/no+tag', ··· 45 45 }); 46 46 } 47 47 48 - public getApiVbyApiVersionSimpleOperation<ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>): HttpRequest<unknown> { 49 - return (options?.client ?? client).requestOptions({ 48 + public getApiVbyApiVersionSimpleOperation<ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>): HttpRequest<GetApiVbyApiVersionSimpleOperationResponse> { 49 + return (options?.client ?? client).requestOptions<GetApiVbyApiVersionSimpleOperationResponse, ThrowOnError>({ 50 50 responseStyle: 'data', 51 51 method: 'GET', 52 52 url: '/api/v{api-version}/simple:operation', ··· 56 56 } 57 57 58 58 export class ODataControllerService { 59 - public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>): HttpRequest<unknown> { 60 - return (options?.client ?? client).requestOptions({ 59 + public count<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>): HttpRequest<ApiVVersionODataControllerCountResponse> { 60 + return (options?.client ?? client).requestOptions<ApiVVersionODataControllerCountResponse, ThrowOnError>({ 61 61 responseStyle: 'data', 62 62 method: 'GET', 63 63 url: '/api/v{api-version}/simple/$count', ··· 83 83 @Injectable({ providedIn: 'root' }) 84 84 export class SimpleServiceRequests { 85 85 public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 86 - return (options?.client ?? client).requestOptions({ 86 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 87 87 responseStyle: 'data', 88 88 method: 'DELETE', 89 89 url: '/api/v{api-version}/simple', ··· 92 92 } 93 93 94 94 public getCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 95 - return (options?.client ?? client).requestOptions({ 95 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 96 96 responseStyle: 'data', 97 97 method: 'GET', 98 98 url: '/api/v{api-version}/simple', ··· 101 101 } 102 102 103 103 public headCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 104 - return (options?.client ?? client).requestOptions({ 104 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 105 105 responseStyle: 'data', 106 106 method: 'HEAD', 107 107 url: '/api/v{api-version}/simple', ··· 110 110 } 111 111 112 112 public optionsCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 113 - return (options?.client ?? client).requestOptions({ 113 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 114 114 responseStyle: 'data', 115 115 method: 'OPTIONS', 116 116 url: '/api/v{api-version}/simple', ··· 119 119 } 120 120 121 121 public patchCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 122 - return (options?.client ?? client).requestOptions({ 122 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 123 123 responseStyle: 'data', 124 124 method: 'PATCH', 125 125 url: '/api/v{api-version}/simple', ··· 128 128 } 129 129 130 130 public postCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 131 - return (options?.client ?? client).requestOptions({ 131 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 132 132 responseStyle: 'data', 133 133 method: 'POST', 134 134 url: '/api/v{api-version}/simple', ··· 137 137 } 138 138 139 139 public putCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 140 - return (options?.client ?? client).requestOptions({ 140 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 141 141 responseStyle: 'data', 142 142 method: 'PUT', 143 143 url: '/api/v{api-version}/simple', ··· 154 154 @Injectable({ providedIn: 'root' }) 155 155 export class ParametersServiceRequests { 156 156 public deleteFoo<ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>): HttpRequest<unknown> { 157 - return (options?.client ?? client).requestOptions({ 157 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 158 158 responseStyle: 'data', 159 159 method: 'DELETE', 160 160 url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', ··· 163 163 } 164 164 165 165 public callWithParameters<ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> { 166 - return (options?.client ?? client).requestOptions({ 166 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 167 167 responseStyle: 'data', 168 168 method: 'POST', 169 169 url: '/api/v{api-version}/parameters/{parameterPath}', ··· 172 172 } 173 173 174 174 public callWithWeirdParameterNames<ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> { 175 - return (options?.client ?? client).requestOptions({ 175 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 176 176 responseStyle: 'data', 177 177 method: 'POST', 178 178 url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', ··· 181 181 } 182 182 183 183 public getCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> { 184 - return (options?.client ?? client).requestOptions({ 184 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 185 185 responseStyle: 'data', 186 186 method: 'GET', 187 187 url: '/api/v{api-version}/parameters', ··· 189 189 }); 190 190 } 191 191 192 - public postCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> { 193 - return (options?.client ?? client).requestOptions({ 192 + public postCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>): HttpRequest<PostCallWithOptionalParamResponse> { 193 + return (options?.client ?? client).requestOptions<PostCallWithOptionalParamResponse, ThrowOnError>({ 194 194 responseStyle: 'data', 195 195 method: 'POST', 196 196 url: '/api/v{api-version}/parameters', ··· 202 202 @Injectable({ providedIn: 'root' }) 203 203 export class DescriptionsServiceRequests { 204 204 public callWithDescriptions<ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> { 205 - return (options?.client ?? client).requestOptions({ 205 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 206 206 responseStyle: 'data', 207 207 method: 'POST', 208 208 url: '/api/v{api-version}/descriptions', ··· 217 217 * @deprecated 218 218 */ 219 219 public deprecatedCall<ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>): HttpRequest<unknown> { 220 - return (options?.client ?? client).requestOptions({ 220 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 221 221 responseStyle: 'data', 222 222 method: 'POST', 223 223 url: '/api/v{api-version}/parameters/deprecated', ··· 229 229 @Injectable({ providedIn: 'root' }) 230 230 export class RequestBodyServiceRequests { 231 231 public postApiVbyApiVersionRequestBody<ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>): HttpRequest<unknown> { 232 - return (options?.client ?? client).requestOptions({ 232 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 233 233 responseStyle: 'data', 234 234 method: 'POST', 235 235 url: '/api/v{api-version}/requestBody', ··· 241 241 @Injectable({ providedIn: 'root' }) 242 242 export class FormDataServiceRequests { 243 243 public postApiVbyApiVersionFormData<ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>): HttpRequest<unknown> { 244 - return (options?.client ?? client).requestOptions({ 244 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 245 245 responseStyle: 'data', 246 246 method: 'POST', 247 247 url: '/api/v{api-version}/formData', ··· 253 253 @Injectable({ providedIn: 'root' }) 254 254 export class DefaultsServiceRequests { 255 255 public callWithDefaultParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> { 256 - return (options?.client ?? client).requestOptions({ 256 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 257 257 responseStyle: 'data', 258 258 method: 'GET', 259 259 url: '/api/v{api-version}/defaults', ··· 262 262 } 263 263 264 264 public callWithDefaultOptionalParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> { 265 - return (options?.client ?? client).requestOptions({ 265 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 266 266 responseStyle: 'data', 267 267 method: 'POST', 268 268 url: '/api/v{api-version}/defaults', ··· 271 271 } 272 272 273 273 public callToTestOrderOfParams<ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> { 274 - return (options?.client ?? client).requestOptions({ 274 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 275 275 responseStyle: 'data', 276 276 method: 'PUT', 277 277 url: '/api/v{api-version}/defaults', ··· 283 283 @Injectable({ providedIn: 'root' }) 284 284 export class DuplicateServiceRequests { 285 285 public duplicateName<ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> { 286 - return (options?.client ?? client).requestOptions({ 286 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 287 287 responseStyle: 'data', 288 288 method: 'DELETE', 289 289 url: '/api/v{api-version}/duplicate', ··· 292 292 } 293 293 294 294 public duplicateName2<ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> { 295 - return (options?.client ?? client).requestOptions({ 295 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 296 296 responseStyle: 'data', 297 297 method: 'DELETE', 298 298 url: '/api/v{api-version}/duplicate', ··· 301 301 } 302 302 303 303 public duplicateName22<ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> { 304 - return (options?.client ?? client).requestOptions({ 304 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 305 305 responseStyle: 'data', 306 306 method: 'GET', 307 307 url: '/api/v{api-version}/duplicate', ··· 310 310 } 311 311 312 312 public duplicateName3<ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> { 313 - return (options?.client ?? client).requestOptions({ 313 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 314 314 responseStyle: 'data', 315 315 method: 'POST', 316 316 url: '/api/v{api-version}/duplicate', ··· 319 319 } 320 320 321 321 public duplicateName4<ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> { 322 - return (options?.client ?? client).requestOptions({ 322 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 323 323 responseStyle: 'data', 324 324 method: 'PUT', 325 325 url: '/api/v{api-version}/duplicate', ··· 330 330 331 331 @Injectable({ providedIn: 'root' }) 332 332 export class NoContentServiceRequests { 333 - public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 334 - return (options?.client ?? client).requestOptions({ 333 + public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<CallWithNoContentResponseResponse> { 334 + return (options?.client ?? client).requestOptions<CallWithNoContentResponseResponse, ThrowOnError>({ 335 335 responseStyle: 'data', 336 336 method: 'GET', 337 337 url: '/api/v{api-version}/no-content', ··· 342 342 343 343 @Injectable({ providedIn: 'root' }) 344 344 export class ResponseServiceRequests { 345 - public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 346 - return (options?.client ?? client).requestOptions({ 345 + public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<CallWithResponseAndNoContentResponseResponse> { 346 + return (options?.client ?? client).requestOptions<CallWithResponseAndNoContentResponseResponse, ThrowOnError>({ 347 347 responseStyle: 'data', 348 348 method: 'GET', 349 349 url: '/api/v{api-version}/multiple-tags/response-and-no-content', ··· 351 351 }); 352 352 } 353 353 354 - public callWithResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<unknown> { 355 - return (options?.client ?? client).requestOptions({ 354 + public callWithResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<CallWithResponseResponse> { 355 + return (options?.client ?? client).requestOptions<CallWithResponseResponse, ThrowOnError>({ 356 356 responseStyle: 'data', 357 357 method: 'GET', 358 358 url: '/api/v{api-version}/response', ··· 360 360 }); 361 361 } 362 362 363 - public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<unknown> { 364 - return (options?.client ?? client).requestOptions({ 363 + public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<CallWithDuplicateResponsesResponse> { 364 + return (options?.client ?? client).requestOptions<CallWithDuplicateResponsesResponse, ThrowOnError>({ 365 365 responseStyle: 'data', 366 366 method: 'POST', 367 367 url: '/api/v{api-version}/response', ··· 369 369 }); 370 370 } 371 371 372 - public callWithResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<unknown> { 373 - return (options?.client ?? client).requestOptions({ 372 + public callWithResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<CallWithResponsesResponse> { 373 + return (options?.client ?? client).requestOptions<CallWithResponsesResponse, ThrowOnError>({ 374 374 responseStyle: 'data', 375 375 method: 'PUT', 376 376 url: '/api/v{api-version}/response', ··· 381 381 382 382 @Injectable({ providedIn: 'root' }) 383 383 export class NoContentServiceRequests2 { 384 - public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 385 - return (options?.client ?? client).requestOptions({ 384 + public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<CallWithResponseAndNoContentResponseResponse> { 385 + return (options?.client ?? client).requestOptions<CallWithResponseAndNoContentResponseResponse, ThrowOnError>({ 386 386 responseStyle: 'data', 387 387 method: 'GET', 388 388 url: '/api/v{api-version}/multiple-tags/response-and-no-content', ··· 393 393 394 394 @Injectable({ providedIn: 'root' }) 395 395 export class MultipleTags1ServiceRequests { 396 - public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> { 397 - return (options?.client ?? client).requestOptions({ 396 + public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<DummyAResponse> { 397 + return (options?.client ?? client).requestOptions<DummyAResponse, ThrowOnError>({ 398 398 responseStyle: 'data', 399 399 method: 'GET', 400 400 url: '/api/v{api-version}/multiple-tags/a', ··· 402 402 }); 403 403 } 404 404 405 - public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 406 - return (options?.client ?? client).requestOptions({ 405 + public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<DummyBResponse> { 406 + return (options?.client ?? client).requestOptions<DummyBResponse, ThrowOnError>({ 407 407 responseStyle: 'data', 408 408 method: 'GET', 409 409 url: '/api/v{api-version}/multiple-tags/b', ··· 414 414 415 415 @Injectable({ providedIn: 'root' }) 416 416 export class MultipleTags2ServiceRequests { 417 - public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> { 418 - return (options?.client ?? client).requestOptions({ 417 + public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<DummyAResponse> { 418 + return (options?.client ?? client).requestOptions<DummyAResponse, ThrowOnError>({ 419 419 responseStyle: 'data', 420 420 method: 'GET', 421 421 url: '/api/v{api-version}/multiple-tags/a', ··· 423 423 }); 424 424 } 425 425 426 - public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 427 - return (options?.client ?? client).requestOptions({ 426 + public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<DummyBResponse> { 427 + return (options?.client ?? client).requestOptions<DummyBResponse, ThrowOnError>({ 428 428 responseStyle: 'data', 429 429 method: 'GET', 430 430 url: '/api/v{api-version}/multiple-tags/b', ··· 435 435 436 436 @Injectable({ providedIn: 'root' }) 437 437 export class MultipleTags3ServiceRequests { 438 - public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 439 - return (options?.client ?? client).requestOptions({ 438 + public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<DummyBResponse> { 439 + return (options?.client ?? client).requestOptions<DummyBResponse, ThrowOnError>({ 440 440 responseStyle: 'data', 441 441 method: 'GET', 442 442 url: '/api/v{api-version}/multiple-tags/b', ··· 448 448 @Injectable({ providedIn: 'root' }) 449 449 export class CollectionFormatServiceRequests { 450 450 public collectionFormat<ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> { 451 - return (options?.client ?? client).requestOptions({ 451 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 452 452 responseStyle: 'data', 453 453 method: 'GET', 454 454 url: '/api/v{api-version}/collectionFormat', ··· 459 459 460 460 @Injectable({ providedIn: 'root' }) 461 461 export class TypesServiceRequests { 462 - public types<ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<unknown> { 463 - return (options?.client ?? client).requestOptions({ 462 + public types<ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<TypesResponse> { 463 + return (options?.client ?? client).requestOptions<TypesResponse, ThrowOnError>({ 464 464 responseStyle: 'data', 465 465 method: 'GET', 466 466 url: '/api/v{api-version}/types', ··· 471 471 472 472 @Injectable({ providedIn: 'root' }) 473 473 export class UploadServiceRequests { 474 - public uploadFile<ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): HttpRequest<unknown> { 475 - return (options?.client ?? client).requestOptions({ 474 + public uploadFile<ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): HttpRequest<UploadFileResponse> { 475 + return (options?.client ?? client).requestOptions<UploadFileResponse, ThrowOnError>({ 476 476 responseStyle: 'data', 477 477 method: 'POST', 478 478 url: '/api/v{api-version}/upload', ··· 483 483 484 484 @Injectable({ providedIn: 'root' }) 485 485 export class FileResponseServiceRequests { 486 - public fileResponse<ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>): HttpRequest<unknown> { 487 - return (options?.client ?? client).requestOptions({ 486 + public fileResponse<ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>): HttpRequest<FileResponseResponse> { 487 + return (options?.client ?? client).requestOptions<FileResponseResponse, ThrowOnError>({ 488 488 responseStyle: 'data', 489 489 method: 'GET', 490 490 url: '/api/v{api-version}/file/{id}', ··· 495 495 496 496 @Injectable({ providedIn: 'root' }) 497 497 export class ComplexServiceRequests { 498 - public complexTypes<ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<unknown> { 499 - return (options?.client ?? client).requestOptions({ 498 + public complexTypes<ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<ComplexTypesResponse> { 499 + return (options?.client ?? client).requestOptions<ComplexTypesResponse, ThrowOnError>({ 500 500 responseStyle: 'data', 501 501 method: 'GET', 502 502 url: '/api/v{api-version}/complex', ··· 504 504 }); 505 505 } 506 506 507 - public complexParams<ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>): HttpRequest<unknown> { 508 - return (options?.client ?? client).requestOptions({ 507 + public complexParams<ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>): HttpRequest<ComplexParamsResponse> { 508 + return (options?.client ?? client).requestOptions<ComplexParamsResponse, ThrowOnError>({ 509 509 responseStyle: 'data', 510 510 method: 'PUT', 511 511 url: '/api/v{api-version}/complex/{id}', ··· 516 516 517 517 @Injectable({ providedIn: 'root' }) 518 518 export class MultipartServiceRequests { 519 - public multipartResponse<ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>): HttpRequest<unknown> { 520 - return (options?.client ?? client).requestOptions({ 519 + public multipartResponse<ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>): HttpRequest<MultipartResponseResponse> { 520 + return (options?.client ?? client).requestOptions<MultipartResponseResponse, ThrowOnError>({ 521 521 responseStyle: 'data', 522 522 method: 'GET', 523 523 url: '/api/v{api-version}/multipart', ··· 526 526 } 527 527 528 528 public multipartRequest<ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>): HttpRequest<unknown> { 529 - return (options?.client ?? client).requestOptions({ 529 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 530 530 responseStyle: 'data', 531 531 method: 'POST', 532 532 url: '/api/v{api-version}/multipart', ··· 538 538 @Injectable({ providedIn: 'root' }) 539 539 export class HeaderServiceRequests { 540 540 public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> { 541 - return (options?.client ?? client).requestOptions({ 541 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 542 542 responseStyle: 'data', 543 543 method: 'POST', 544 544 url: '/api/v{api-version}/header', ··· 550 550 @Injectable({ providedIn: 'root' }) 551 551 export class ErrorServiceRequests { 552 552 public testErrorCode<ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> { 553 - return (options?.client ?? client).requestOptions({ 553 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 554 554 responseStyle: 'data', 555 555 method: 'POST', 556 556 url: '/api/v{api-version}/error', ··· 561 561 562 562 @Injectable({ providedIn: 'root' }) 563 563 export class NonAsciiÆøåÆøÅöôêÊServiceRequests { 564 - public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<unknown> { 565 - return (options?.client ?? client).requestOptions({ 564 + public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<NonAsciiæøåÆøÅöôêÊ字符串Response> { 565 + return (options?.client ?? client).requestOptions<NonAsciiæøåÆøÅöôêÊ字符串Response, ThrowOnError>({ 566 566 responseStyle: 'data', 567 567 method: 'POST', 568 568 url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', ··· 574 574 * Login User 575 575 */ 576 576 public putWithFormUrlEncoded<ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>): HttpRequest<unknown> { 577 - return (options?.client ?? client).requestOptions({ 577 + return (options?.client ?? client).requestOptions<unknown, ThrowOnError>({ 578 578 responseStyle: 'data', 579 579 method: 'PUT', 580 580 url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/client.gen.ts
··· 55 55 >(); 56 56 57 57 const requestOptions = < 58 + TData = unknown, 58 59 ThrowOnError extends boolean = false, 59 60 TResponseStyle extends ResponseStyle = 'fields', 60 61 >( 61 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 62 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 62 63 ) => { 63 64 const opts = { 64 65 ..._config,
+3 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/types.gen.ts
··· 172 172 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 173 173 174 174 type RequestOptionsFn = < 175 + T, 175 176 ThrowOnError extends boolean = false, 176 177 TResponseStyle extends ResponseStyle = 'fields', 177 178 >( 178 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 179 - ) => HttpRequest<unknown>; 179 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 180 + ) => HttpRequest<T>; 180 181 181 182 type BuildUrlFn = < 182 183 TData extends {
+2 -2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/client.gen.ts
··· 144 144 body.value = serializeBody(changed); 145 145 }); 146 146 return composable === 'useLazyFetch' 147 - ? useLazyFetch(() => buildUrl(opts), opts) 148 - : useFetch(() => buildUrl(opts), opts); 147 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 148 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 149 149 } 150 150 151 151 const handler: any = () =>
+2 -3
packages/openapi-ts-tests/main/test/clients.test.ts
··· 5 5 import { customClientPlugin } from '@hey-api/custom-client/plugin'; 6 6 import { createClient, type UserConfig } from '@hey-api/openapi-ts'; 7 7 8 - import type { PluginClientNames } from '../../../openapi-ts/src/plugins/types'; 9 8 import { getFilePaths, getSpecsPath } from '../../utils'; 10 9 import { myClientPlugin } from './custom/client/plugin'; 11 10 12 11 const __filename = fileURLToPath(import.meta.url); 13 12 const __dirname = path.dirname(__filename); 14 13 15 - const clients: ReadonlyArray<PluginClientNames> = [ 14 + const clients = [ 16 15 '@hey-api/client-angular', 17 16 '@hey-api/client-axios', 18 17 '@hey-api/client-fetch', ··· 20 19 '@hey-api/client-next', 21 20 '@hey-api/client-nuxt', 22 21 '@hey-api/client-ofetch', 23 - ]; 22 + ] satisfies UserConfig['plugins']; 24 23 25 24 for (const client of clients) { 26 25 const namespace = 'clients';
+3 -7
packages/openapi-ts-tests/main/tsconfig.json
··· 2 2 "extends": "../tsconfig.base.json", 3 3 "compilerOptions": { 4 4 "allowImportingTsExtensions": true, 5 - "declaration": false, 6 - "esModuleInterop": true, 7 - "noEmit": true, 8 - "resolveJsonModule": true, 9 - "skipLibCheck": true, 10 - "types": ["vitest/globals"] 5 + "resolveJsonModule": true 11 6 }, 12 - "exclude": ["test/custom/request.ts", "test/generated/**"] 7 + "exclude": ["test/custom/request.ts", "test/generated/**"], 8 + "references": [{ "path": "../../openapi-ts" }] 13 9 }
-26
packages/openapi-ts-tests/main/tsconfig.test.json
··· 1 - { 2 - "$schema": "https://json.schemastore.org/tsconfig", 3 - "compilerOptions": { 4 - "esModuleInterop": true, 5 - "experimentalDecorators": true, 6 - "isolatedModules": true, 7 - "lib": ["ES2022"], 8 - "module": "ES2022", 9 - "moduleDetection": "force", 10 - "moduleResolution": "bundler", 11 - "noEmit": true, 12 - "noImplicitOverride": true, 13 - "noImplicitReturns": true, 14 - "noUncheckedIndexedAccess": true, 15 - "noUncheckedSideEffectImports": true, 16 - "noUnusedLocals": true, 17 - "noUnusedParameters": true, 18 - "resolveJsonModule": true, 19 - "skipLibCheck": true, 20 - "strict": true, 21 - "target": "ES2022", 22 - "types": ["node", "vitest/globals"], 23 - "useDefineForClassFields": true 24 - }, 25 - "include": ["test/generated/2.0.x/**/*", "test/generated/3.0.x/**/*", "test/generated/3.1.x/**/*"] 26 - }
+2 -1
packages/openapi-ts-tests/sdks/tsconfig.json
··· 1 1 { 2 2 "extends": "../tsconfig.base.json", 3 3 "include": ["test/**/*", "__snapshots__/**/*"], 4 - "exclude": [".gen/**/*"] 4 + "exclude": [".gen/**/*"], 5 + "references": [{ "path": "../../openapi-ts" }] 5 6 }
+3 -9
packages/openapi-ts-tests/tsconfig.base.json
··· 1 1 { 2 + "extends": "../../tsconfig.base.json", 2 3 "compilerOptions": { 3 - "esModuleInterop": true, 4 - "module": "ESNext", 5 - "moduleResolution": "Bundler", 4 + "declaration": false, 5 + "declarationMap": false, 6 6 "noEmit": true, 7 - "noImplicitAny": true, 8 7 "noImplicitOverride": true, 9 8 "noImplicitReturns": true, 10 - "noUncheckedIndexedAccess": true, 11 9 "noUnusedLocals": true, 12 10 "noUnusedParameters": true, 13 - "resolveJsonModule": true, 14 - "skipLibCheck": true, 15 - "strict": true, 16 - "target": "ES2022", 17 11 "types": ["vitest/globals"], 18 12 "useUnknownInCatchVariables": false 19 13 }
+2 -1
packages/openapi-ts-tests/zod/v3/tsconfig.json
··· 1 1 { 2 2 "extends": "../../tsconfig.base.json", 3 3 "include": ["test/**/*", "__snapshots__/**/*"], 4 - "exclude": [".gen/**/*"] 4 + "exclude": [".gen/**/*"], 5 + "references": [{ "path": "../../../openapi-ts" }] 5 6 }
+2 -1
packages/openapi-ts-tests/zod/v4/tsconfig.json
··· 1 1 { 2 2 "extends": "../../tsconfig.base.json", 3 3 "include": ["test/**/*", "__snapshots__/**/*"], 4 - "exclude": [".gen/**/*"] 4 + "exclude": [".gen/**/*"], 5 + "references": [{ "path": "../../../openapi-ts" }] 5 6 }
+40
packages/openapi-ts/src/__tests__/index.test.ts
··· 285 285 const results = await createClient(config); 286 286 expect(results).toHaveLength(4); 287 287 }); 288 + 289 + it('executes @angular/common HttpRequest builder path', async () => { 290 + const results = await createClient({ 291 + dryRun: true, 292 + input: { 293 + info: { title: 'angular-common-test', version: '1.0.0' }, 294 + openapi: '3.1.0', 295 + paths: { 296 + '/pets': { 297 + get: { 298 + operationId: 'listPets', 299 + responses: { 300 + 200: { 301 + content: { 302 + 'application/json': { 303 + schema: { 304 + items: { type: 'string' }, 305 + type: 'array', 306 + }, 307 + }, 308 + }, 309 + description: 'ok', 310 + }, 311 + }, 312 + }, 313 + }, 314 + }, 315 + }, 316 + logs: { level: 'silent' }, 317 + output: 'out', 318 + plugins: [ 319 + '@hey-api/typescript', 320 + '@hey-api/sdk', 321 + '@angular/common', 322 + '@hey-api/client-angular', 323 + ], 324 + }); 325 + 326 + expect(results.length).toBeGreaterThanOrEqual(1); 327 + }); 288 328 });
+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 }
+2 -1
packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts
··· 53 53 >(); 54 54 55 55 const requestOptions = < 56 + TData = unknown, 56 57 ThrowOnError extends boolean = false, 57 58 TResponseStyle extends ResponseStyle = 'fields', 58 59 >( 59 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 60 + options: RequestOptions<TData, TResponseStyle, ThrowOnError>, 60 61 ) => { 61 62 const opts = { 62 63 ..._config,
+3 -2
packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/types.ts
··· 170 170 ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 171 171 172 172 type RequestOptionsFn = < 173 + T, 173 174 ThrowOnError extends boolean = false, 174 175 TResponseStyle extends ResponseStyle = 'fields', 175 176 >( 176 - options: RequestOptions<unknown, TResponseStyle, ThrowOnError>, 177 - ) => HttpRequest<unknown>; 177 + options: RequestOptions<T, TResponseStyle, ThrowOnError>, 178 + ) => HttpRequest<T>; 178 179 179 180 type BuildUrlFn = < 180 181 TData extends {
+2 -2
packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts
··· 142 142 body.value = serializeBody(changed); 143 143 }); 144 144 return composable === 'useLazyFetch' 145 - ? useLazyFetch(() => buildUrl(opts), opts) 146 - : useFetch(() => buildUrl(opts), opts); 145 + ? useLazyFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }) 146 + : useFetch(() => buildUrl(opts), { ...opts, ...asyncDataOptions }); 147 147 } 148 148 149 149 const handler: any = () =>