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

refactor: angular plugin use dsl

Lubos fc046546 40cc96c6

+2110 -2983
+29 -29
dev/openapi-ts.config.ts
··· 33 33 // openapi: '3.1.0', 34 34 // paths: {}, 35 35 // }, 36 - path: path.resolve( 37 - getSpecsPath(), 38 - // '3.0.x', 39 - '3.1.x', 40 - // 'circular.yaml', 41 - // 'dutchie.json', 42 - // 'invalid', 43 - 'full.yaml', 44 - // 'object-property-names.yaml', 45 - // 'openai.yaml', 46 - // 'opencode.yaml', 47 - // 'pagination-ref.yaml', 48 - // 'sdk-instance.yaml', 49 - // 'string-with-format.yaml', 50 - // 'transformers.json', 51 - // 'type-format.yaml', 52 - // 'validators.yaml', 53 - // 'validators-circular-ref.json', 54 - // 'validators-circular-ref-2.yaml', 55 - // 'zoom-video-sdk.json', 56 - ), 36 + // path: path.resolve( 37 + // getSpecsPath(), 38 + // // '3.0.x', 39 + // '3.1.x', 40 + // // 'circular.yaml', 41 + // // 'dutchie.json', 42 + // // 'invalid', 43 + // 'full.yaml', 44 + // // 'object-property-names.yaml', 45 + // // 'openai.yaml', 46 + // // 'opencode.yaml', 47 + // // 'pagination-ref.yaml', 48 + // // 'sdk-instance.yaml', 49 + // // 'string-with-format.yaml', 50 + // // 'transformers.json', 51 + // // 'type-format.yaml', 52 + // // 'validators.yaml', 53 + // // 'validators-circular-ref.json', 54 + // // 'validators-circular-ref-2.yaml', 55 + // // 'zoom-video-sdk.json', 56 + // ), 57 57 // path: 'https://get.heyapi.dev/hey-api/backend?branch=main&version=1.0.0', 58 58 // path: 'http://localhost:4000/', 59 59 // path: 'http://localhost:8000/openapi.json', 60 60 // path: 'https://mongodb-mms-prod-build-server.s3.amazonaws.com/openapi/2caffd88277a4e27c95dcefc7e3b6a63a3b03297-v2-2023-11-15.json', 61 - // path: 'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml', 61 + path: 'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml', 62 62 // watch: { 63 63 // enabled: true, 64 64 // interval: 500, ··· 217 217 { 218 218 // baseUrl: false, 219 219 // exportFromIndex: true, 220 - name: '@hey-api/client-fetch', 220 + name: '@hey-api/client-angular', 221 221 // runtimeConfigPath: path.resolve(__dirname, 'hey-api.ts'), 222 222 // runtimeConfigPath: './src/hey-api.ts', 223 223 // strictBaseUrl: true, 224 - // throwOnError: true, 224 + throwOnError: true, 225 225 }, 226 226 { 227 227 // case: 'snake_case', ··· 255 255 // classNameBuilder: '{{name}}', 256 256 // classNameBuilder: '{{name}}Service', 257 257 // classStructure: 'off', 258 - client: false, 258 + // client: false, 259 259 // getSignature: ({ fields, signature, operation }) => { 260 260 // // ... 261 261 // fields.unwrap('path') ··· 265 265 name: '@hey-api/sdk', 266 266 // operationId: false, 267 267 // paramsStructure: 'flat', 268 - // responseStyle: 'data', 268 + responseStyle: 'data', 269 269 // signature: 'auto', 270 270 // signature: 'client', 271 271 // signature: 'object', ··· 517 517 { 518 518 exportFromIndex: true, 519 519 httpRequests: { 520 - // asClass: true, 520 + asClass: true, 521 521 }, 522 522 httpResources: { 523 - // asClass: true, 523 + asClass: true, 524 524 }, 525 - // name: '@angular/common', 525 + name: '@angular/common', 526 526 }, 527 527 { 528 528 exportFromIndex: true,
+3 -9
examples/openapi-ts-angular-common/src/client/@angular/common.gen.ts
··· 328 328 ...options, 329 329 }); 330 330 331 - @Injectable({ 332 - providedIn: 'root', 333 - }) 331 + @Injectable({ providedIn: 'root' }) 334 332 export class PetServiceResources { 335 333 /** 336 334 * Add a new pet to the store. ··· 445 443 } 446 444 } 447 445 448 - @Injectable({ 449 - providedIn: 'root', 450 - }) 446 + @Injectable({ providedIn: 'root' }) 451 447 export class StoreServiceResources { 452 448 /** 453 449 * Returns pet inventories by status. ··· 506 502 } 507 503 } 508 504 509 - @Injectable({ 510 - providedIn: 'root', 511 - }) 505 + @Injectable({ providedIn: 'root' }) 512 506 export class UserServiceResources { 513 507 /** 514 508 * Create user.
+148 -216
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts
··· 7 7 import type { Options } from '../sdk.gen'; 8 8 import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; 9 9 10 - @Injectable({ 11 - providedIn: 'root' 12 - }) 10 + @Injectable({ providedIn: "root" }) 13 11 export class DefaultServiceRequests { 14 12 public serviceWithEmptyTag<ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>): HttpRequest<unknown> { 15 13 return (options?.client ?? client).requestOptions({ 16 - responseStyle: 'data', 17 - method: 'GET', 18 - url: '/api/v{api-version}/no+tag', 14 + responseStyle: "data", 15 + method: "GET", 16 + url: "/api/v{api-version}/no+tag", 19 17 ...options 20 18 }); 21 19 } 22 20 23 21 public patchApiVbyApiVersionNoTag<ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> { 24 22 return (options?.client ?? client).requestOptions({ 25 - responseStyle: 'data', 26 - method: 'PATCH', 27 - url: '/api/v{api-version}/no+tag', 23 + responseStyle: "data", 24 + method: "PATCH", 25 + url: "/api/v{api-version}/no+tag", 28 26 ...options 29 27 }); 30 28 } 31 29 32 30 public fooWow<ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> { 33 31 return (options?.client ?? client).requestOptions({ 34 - responseStyle: 'data', 35 - method: 'PUT', 36 - url: '/api/v{api-version}/no+tag', 32 + responseStyle: "data", 33 + method: "PUT", 34 + url: "/api/v{api-version}/no+tag", 37 35 ...options 38 36 }); 39 37 } ··· 45 43 */ 46 44 public postApiVbyApiVersionBody<ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>): HttpRequest<unknown> { 47 45 return (options?.client ?? client).requestOptions({ 48 - responseStyle: 'data', 49 - method: 'POST', 50 - url: '/api/v{api-version}/body', 46 + responseStyle: "data", 47 + method: "POST", 48 + url: "/api/v{api-version}/body", 51 49 ...options 52 50 }); 53 51 } 54 52 } 55 53 56 - @Injectable({ 57 - providedIn: 'root' 58 - }) 54 + @Injectable({ providedIn: "root" }) 59 55 export class SimpleServiceRequests { 60 56 public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 61 57 return (options?.client ?? client).requestOptions({ 62 - responseStyle: 'data', 63 - method: 'DELETE', 64 - url: '/api/v{api-version}/simple', 58 + responseStyle: "data", 59 + method: "DELETE", 60 + url: "/api/v{api-version}/simple", 65 61 ...options 66 62 }); 67 63 } 68 64 69 65 public getCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 70 66 return (options?.client ?? client).requestOptions({ 71 - responseStyle: 'data', 72 - method: 'GET', 73 - url: '/api/v{api-version}/simple', 67 + responseStyle: "data", 68 + method: "GET", 69 + url: "/api/v{api-version}/simple", 74 70 ...options 75 71 }); 76 72 } 77 73 78 74 public headCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 79 75 return (options?.client ?? client).requestOptions({ 80 - responseStyle: 'data', 81 - method: 'HEAD', 82 - url: '/api/v{api-version}/simple', 76 + responseStyle: "data", 77 + method: "HEAD", 78 + url: "/api/v{api-version}/simple", 83 79 ...options 84 80 }); 85 81 } 86 82 87 83 public optionsCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 88 84 return (options?.client ?? client).requestOptions({ 89 - responseStyle: 'data', 90 - method: 'OPTIONS', 91 - url: '/api/v{api-version}/simple', 85 + responseStyle: "data", 86 + method: "OPTIONS", 87 + url: "/api/v{api-version}/simple", 92 88 ...options 93 89 }); 94 90 } 95 91 96 92 public patchCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 97 93 return (options?.client ?? client).requestOptions({ 98 - responseStyle: 'data', 99 - method: 'PATCH', 100 - url: '/api/v{api-version}/simple', 94 + responseStyle: "data", 95 + method: "PATCH", 96 + url: "/api/v{api-version}/simple", 101 97 ...options 102 98 }); 103 99 } 104 100 105 101 public postCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 106 102 return (options?.client ?? client).requestOptions({ 107 - responseStyle: 'data', 108 - method: 'POST', 109 - url: '/api/v{api-version}/simple', 103 + responseStyle: "data", 104 + method: "POST", 105 + url: "/api/v{api-version}/simple", 110 106 ...options 111 107 }); 112 108 } 113 109 114 110 public putCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 115 111 return (options?.client ?? client).requestOptions({ 116 - responseStyle: 'data', 117 - method: 'PUT', 118 - url: '/api/v{api-version}/simple', 112 + responseStyle: "data", 113 + method: "PUT", 114 + url: "/api/v{api-version}/simple", 119 115 ...options 120 116 }); 121 117 } 122 118 } 123 119 124 - @Injectable({ 125 - providedIn: 'root' 126 - }) 120 + @Injectable({ providedIn: "root" }) 127 121 export class DescriptionsServiceRequests { 128 122 public callWithDescriptions<ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> { 129 123 return (options?.client ?? client).requestOptions({ 130 - responseStyle: 'data', 131 - method: 'POST', 132 - url: '/api/v{api-version}/descriptions/', 124 + responseStyle: "data", 125 + method: "POST", 126 + url: "/api/v{api-version}/descriptions/", 133 127 ...options 134 128 }); 135 129 } 136 130 } 137 131 138 - @Injectable({ 139 - providedIn: 'root' 140 - }) 132 + @Injectable({ providedIn: "root" }) 141 133 export class ParametersServiceRequests { 142 134 public callWithParameters<ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> { 143 135 return (options?.client ?? client).requestOptions({ 144 - responseStyle: 'data', 145 - method: 'POST', 146 - url: '/api/v{api-version}/parameters/{parameterPath}', 136 + responseStyle: "data", 137 + method: "POST", 138 + url: "/api/v{api-version}/parameters/{parameterPath}", 147 139 ...options 148 140 }); 149 141 } 150 142 151 143 public callWithWeirdParameterNames<ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> { 152 144 return (options?.client ?? client).requestOptions({ 153 - responseStyle: 'data', 154 - method: 'POST', 155 - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 145 + responseStyle: "data", 146 + method: "POST", 147 + url: "/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}", 156 148 ...options 157 149 }); 158 150 } 159 151 } 160 152 161 - @Injectable({ 162 - providedIn: 'root' 163 - }) 153 + @Injectable({ providedIn: "root" }) 164 154 export class DefaultsServiceRequests { 165 155 public callWithDefaultParameters<ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> { 166 156 return (options?.client ?? client).requestOptions({ 167 - responseStyle: 'data', 168 - method: 'GET', 169 - url: '/api/v{api-version}/defaults', 157 + responseStyle: "data", 158 + method: "GET", 159 + url: "/api/v{api-version}/defaults", 170 160 ...options 171 161 }); 172 162 } 173 163 174 164 public callWithDefaultOptionalParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> { 175 165 return (options?.client ?? client).requestOptions({ 176 - responseStyle: 'data', 177 - method: 'POST', 178 - url: '/api/v{api-version}/defaults', 166 + responseStyle: "data", 167 + method: "POST", 168 + url: "/api/v{api-version}/defaults", 179 169 ...options 180 170 }); 181 171 } 182 172 183 173 public callToTestOrderOfParams<ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> { 184 174 return (options?.client ?? client).requestOptions({ 185 - responseStyle: 'data', 186 - method: 'PUT', 187 - url: '/api/v{api-version}/defaults', 175 + responseStyle: "data", 176 + method: "PUT", 177 + url: "/api/v{api-version}/defaults", 188 178 ...options 189 179 }); 190 180 } 191 181 } 192 182 193 - @Injectable({ 194 - providedIn: 'root' 195 - }) 183 + @Injectable({ providedIn: "root" }) 196 184 export class DuplicateServiceRequests { 197 185 public duplicateName<ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> { 198 186 return (options?.client ?? client).requestOptions({ 199 - responseStyle: 'data', 200 - method: 'DELETE', 201 - url: '/api/v{api-version}/duplicate', 187 + responseStyle: "data", 188 + method: "DELETE", 189 + url: "/api/v{api-version}/duplicate", 202 190 ...options 203 191 }); 204 192 } 205 193 206 194 public duplicateName2<ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> { 207 195 return (options?.client ?? client).requestOptions({ 208 - responseStyle: 'data', 209 - method: 'GET', 210 - url: '/api/v{api-version}/duplicate', 196 + responseStyle: "data", 197 + method: "GET", 198 + url: "/api/v{api-version}/duplicate", 211 199 ...options 212 200 }); 213 201 } 214 202 215 203 public duplicateName3<ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> { 216 204 return (options?.client ?? client).requestOptions({ 217 - responseStyle: 'data', 218 - method: 'POST', 219 - url: '/api/v{api-version}/duplicate', 205 + responseStyle: "data", 206 + method: "POST", 207 + url: "/api/v{api-version}/duplicate", 220 208 ...options 221 209 }); 222 210 } 223 211 224 212 public duplicateName4<ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> { 225 213 return (options?.client ?? client).requestOptions({ 226 - responseStyle: 'data', 227 - method: 'PUT', 228 - url: '/api/v{api-version}/duplicate', 214 + responseStyle: "data", 215 + method: "PUT", 216 + url: "/api/v{api-version}/duplicate", 229 217 ...options 230 218 }); 231 219 } 232 220 } 233 221 234 - @Injectable({ 235 - providedIn: 'root' 236 - }) 222 + @Injectable({ providedIn: "root" }) 237 223 export class NoContentServiceRequests { 238 224 public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 239 225 return (options?.client ?? client).requestOptions({ 240 - responseStyle: 'data', 241 - method: 'GET', 242 - url: '/api/v{api-version}/no-content', 226 + responseStyle: "data", 227 + method: "GET", 228 + url: "/api/v{api-version}/no-content", 243 229 ...options 244 230 }); 245 231 } 246 232 247 233 public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 248 234 return (options?.client ?? client).requestOptions({ 249 - responseStyle: 'data', 250 - method: 'GET', 251 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 235 + responseStyle: "data", 236 + method: "GET", 237 + url: "/api/v{api-version}/multiple-tags/response-and-no-content", 252 238 ...options 253 239 }); 254 240 } 255 241 } 256 242 257 - @Injectable({ 258 - providedIn: 'root' 259 - }) 243 + @Injectable({ providedIn: "root" }) 260 244 export class ResponseServiceRequests { 261 245 public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 262 246 return (options?.client ?? client).requestOptions({ 263 - responseStyle: 'data', 264 - method: 'GET', 265 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 247 + responseStyle: "data", 248 + method: "GET", 249 + url: "/api/v{api-version}/multiple-tags/response-and-no-content", 266 250 ...options 267 251 }); 268 252 } 269 253 270 254 public callWithResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<unknown> { 271 255 return (options?.client ?? client).requestOptions({ 272 - responseStyle: 'data', 273 - method: 'GET', 274 - url: '/api/v{api-version}/response', 256 + responseStyle: "data", 257 + method: "GET", 258 + url: "/api/v{api-version}/response", 275 259 ...options 276 260 }); 277 261 } 278 262 279 263 public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<unknown> { 280 264 return (options?.client ?? client).requestOptions({ 281 - responseStyle: 'data', 282 - method: 'POST', 283 - url: '/api/v{api-version}/response', 265 + responseStyle: "data", 266 + method: "POST", 267 + url: "/api/v{api-version}/response", 284 268 ...options 285 269 }); 286 270 } 287 271 288 272 public callWithResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<unknown> { 289 273 return (options?.client ?? client).requestOptions({ 290 - responseStyle: 'data', 291 - method: 'PUT', 292 - url: '/api/v{api-version}/response', 274 + responseStyle: "data", 275 + method: "PUT", 276 + url: "/api/v{api-version}/response", 293 277 ...options 294 278 }); 295 279 } 296 280 } 297 281 298 - @Injectable({ 299 - providedIn: 'root' 300 - }) 282 + @Injectable({ providedIn: "root" }) 301 283 export class MultipleTags1ServiceRequests { 302 284 public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> { 303 285 return (options?.client ?? client).requestOptions({ 304 - responseStyle: 'data', 305 - method: 'GET', 306 - url: '/api/v{api-version}/multiple-tags/a', 286 + responseStyle: "data", 287 + method: "GET", 288 + url: "/api/v{api-version}/multiple-tags/a", 307 289 ...options 308 290 }); 309 291 } 310 292 311 293 public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 312 294 return (options?.client ?? client).requestOptions({ 313 - responseStyle: 'data', 314 - method: 'GET', 315 - url: '/api/v{api-version}/multiple-tags/b', 295 + responseStyle: "data", 296 + method: "GET", 297 + url: "/api/v{api-version}/multiple-tags/b", 316 298 ...options 317 299 }); 318 300 } 319 301 } 320 302 321 - @Injectable({ 322 - providedIn: 'root' 323 - }) 303 + @Injectable({ providedIn: "root" }) 324 304 export class MultipleTags2ServiceRequests { 325 305 public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> { 326 306 return (options?.client ?? client).requestOptions({ 327 - responseStyle: 'data', 328 - method: 'GET', 329 - url: '/api/v{api-version}/multiple-tags/a', 307 + responseStyle: "data", 308 + method: "GET", 309 + url: "/api/v{api-version}/multiple-tags/a", 330 310 ...options 331 311 }); 332 312 } 333 313 334 314 public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 335 315 return (options?.client ?? client).requestOptions({ 336 - responseStyle: 'data', 337 - method: 'GET', 338 - url: '/api/v{api-version}/multiple-tags/b', 316 + responseStyle: "data", 317 + method: "GET", 318 + url: "/api/v{api-version}/multiple-tags/b", 339 319 ...options 340 320 }); 341 321 } 342 322 } 343 323 344 - @Injectable({ 345 - providedIn: 'root' 346 - }) 324 + @Injectable({ providedIn: "root" }) 347 325 export class MultipleTags3ServiceRequests { 348 326 public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 349 327 return (options?.client ?? client).requestOptions({ 350 - responseStyle: 'data', 351 - method: 'GET', 352 - url: '/api/v{api-version}/multiple-tags/b', 328 + responseStyle: "data", 329 + method: "GET", 330 + url: "/api/v{api-version}/multiple-tags/b", 353 331 ...options 354 332 }); 355 333 } 356 334 } 357 335 358 - @Injectable({ 359 - providedIn: 'root' 360 - }) 336 + @Injectable({ providedIn: "root" }) 361 337 export class CollectionFormatServiceRequests { 362 338 public collectionFormat<ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> { 363 339 return (options?.client ?? client).requestOptions({ 364 - responseStyle: 'data', 365 - method: 'GET', 366 - url: '/api/v{api-version}/collectionFormat', 340 + responseStyle: "data", 341 + method: "GET", 342 + url: "/api/v{api-version}/collectionFormat", 367 343 ...options 368 344 }); 369 345 } 370 346 } 371 347 372 - @Injectable({ 373 - providedIn: 'root' 374 - }) 348 + @Injectable({ providedIn: "root" }) 375 349 export class TypesServiceRequests { 376 350 public types<ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<unknown> { 377 351 return (options?.client ?? client).requestOptions({ 378 - responseStyle: 'data', 379 - method: 'GET', 380 - url: '/api/v{api-version}/types', 352 + responseStyle: "data", 353 + method: "GET", 354 + url: "/api/v{api-version}/types", 381 355 ...options 382 356 }); 383 357 } 384 358 } 385 359 386 - @Injectable({ 387 - providedIn: 'root' 388 - }) 360 + @Injectable({ providedIn: "root" }) 389 361 export class ComplexServiceRequests { 390 362 public complexTypes<ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<unknown> { 391 363 return (options?.client ?? client).requestOptions({ 392 - responseStyle: 'data', 393 - method: 'GET', 394 - url: '/api/v{api-version}/complex', 364 + responseStyle: "data", 365 + method: "GET", 366 + url: "/api/v{api-version}/complex", 395 367 ...options 396 368 }); 397 369 } 398 370 } 399 371 400 - @Injectable({ 401 - providedIn: 'root' 402 - }) 372 + @Injectable({ providedIn: "root" }) 403 373 export class HeaderServiceRequests { 404 374 public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> { 405 375 return (options?.client ?? client).requestOptions({ 406 - responseStyle: 'data', 407 - method: 'POST', 408 - url: '/api/v{api-version}/header', 376 + responseStyle: "data", 377 + method: "POST", 378 + url: "/api/v{api-version}/header", 409 379 ...options 410 380 }); 411 381 } 412 382 } 413 383 414 - @Injectable({ 415 - providedIn: 'root' 416 - }) 384 + @Injectable({ providedIn: "root" }) 417 385 export class ErrorServiceRequests { 418 386 public testErrorCode<ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> { 419 387 return (options?.client ?? client).requestOptions({ 420 - responseStyle: 'data', 421 - method: 'POST', 422 - url: '/api/v{api-version}/error', 388 + responseStyle: "data", 389 + method: "POST", 390 + url: "/api/v{api-version}/error", 423 391 ...options 424 392 }); 425 393 } 426 394 } 427 395 428 - @Injectable({ 429 - providedIn: 'root' 430 - }) 396 + @Injectable({ providedIn: "root" }) 431 397 export class NonAsciiÆøåÆøÅöôêÊServiceRequests { 432 398 public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<unknown> { 433 399 return (options?.client ?? client).requestOptions({ 434 - responseStyle: 'data', 435 - method: 'POST', 436 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 400 + responseStyle: "data", 401 + method: "POST", 402 + url: "/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串", 437 403 ...options 438 404 }); 439 405 } 440 406 } 441 407 442 - @Injectable({ 443 - providedIn: 'root' 444 - }) 408 + @Injectable({ providedIn: "root" }) 445 409 export class DefaultServiceResources { 446 410 public serviceWithEmptyTag<ThrowOnError extends boolean = false>(options?: () => Options<ServiceWithEmptyTagData, ThrowOnError> | undefined) { 447 411 return httpResource<unknown>(() => { ··· 477 441 } 478 442 } 479 443 480 - @Injectable({ 481 - providedIn: 'root' 482 - }) 444 + @Injectable({ providedIn: "root" }) 483 445 export class SimpleServiceResources { 484 446 public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError> | undefined) { 485 447 return httpResource<unknown>(() => { ··· 531 493 } 532 494 } 533 495 534 - @Injectable({ 535 - providedIn: 'root' 536 - }) 496 + @Injectable({ providedIn: "root" }) 537 497 export class DescriptionsServiceResources { 538 498 public callWithDescriptions<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDescriptionsData, ThrowOnError> | undefined) { 539 499 return httpResource<unknown>(() => { ··· 543 503 } 544 504 } 545 505 546 - @Injectable({ 547 - providedIn: 'root' 548 - }) 506 + @Injectable({ providedIn: "root" }) 549 507 export class ParametersServiceResources { 550 508 public callWithParameters<ThrowOnError extends boolean = false>(options: () => Options<CallWithParametersData, ThrowOnError> | undefined) { 551 509 return httpResource<unknown>(() => { ··· 562 520 } 563 521 } 564 522 565 - @Injectable({ 566 - providedIn: 'root' 567 - }) 523 + @Injectable({ providedIn: "root" }) 568 524 export class DefaultsServiceResources { 569 525 public callWithDefaultParameters<ThrowOnError extends boolean = false>(options: () => Options<CallWithDefaultParametersData, ThrowOnError> | undefined) { 570 526 return httpResource<unknown>(() => { ··· 588 544 } 589 545 } 590 546 591 - @Injectable({ 592 - providedIn: 'root' 593 - }) 547 + @Injectable({ providedIn: "root" }) 594 548 export class DuplicateServiceResources { 595 549 public duplicateName<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) { 596 550 return httpResource<unknown>(() => { ··· 621 575 } 622 576 } 623 577 624 - @Injectable({ 625 - providedIn: 'root' 626 - }) 578 + @Injectable({ providedIn: "root" }) 627 579 export class NoContentServiceResources { 628 580 public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithNoContentResponseData, ThrowOnError> | undefined) { 629 581 return httpResource<unknown>(() => { ··· 640 592 } 641 593 } 642 594 643 - @Injectable({ 644 - providedIn: 'root' 645 - }) 595 + @Injectable({ providedIn: "root" }) 646 596 export class ResponseServiceResources { 647 597 public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) { 648 598 return httpResource<CallWithResponseAndNoContentResponseResponse>(() => { ··· 673 623 } 674 624 } 675 625 676 - @Injectable({ 677 - providedIn: 'root' 678 - }) 626 + @Injectable({ providedIn: "root" }) 679 627 export class MultipleTags1ServiceResources { 680 628 public dummyA<ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) { 681 629 return httpResource<unknown>(() => { ··· 692 640 } 693 641 } 694 642 695 - @Injectable({ 696 - providedIn: 'root' 697 - }) 643 + @Injectable({ providedIn: "root" }) 698 644 export class MultipleTags2ServiceResources { 699 645 public dummyA<ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) { 700 646 return httpResource<unknown>(() => { ··· 711 657 } 712 658 } 713 659 714 - @Injectable({ 715 - providedIn: 'root' 716 - }) 660 + @Injectable({ providedIn: "root" }) 717 661 export class MultipleTags3ServiceResources { 718 662 public dummyB<ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) { 719 663 return httpResource<unknown>(() => { ··· 723 667 } 724 668 } 725 669 726 - @Injectable({ 727 - providedIn: 'root' 728 - }) 670 + @Injectable({ providedIn: "root" }) 729 671 export class CollectionFormatServiceResources { 730 672 public collectionFormat<ThrowOnError extends boolean = false>(options: () => Options<CollectionFormatData, ThrowOnError> | undefined) { 731 673 return httpResource<unknown>(() => { ··· 735 677 } 736 678 } 737 679 738 - @Injectable({ 739 - providedIn: 'root' 740 - }) 680 + @Injectable({ providedIn: "root" }) 741 681 export class TypesServiceResources { 742 682 public types<ThrowOnError extends boolean = false>(options: () => Options<TypesData, ThrowOnError> | undefined) { 743 683 return httpResource<TypesResponse>(() => { ··· 747 687 } 748 688 } 749 689 750 - @Injectable({ 751 - providedIn: 'root' 752 - }) 690 + @Injectable({ providedIn: "root" }) 753 691 export class ComplexServiceResources { 754 692 public complexTypes<ThrowOnError extends boolean = false>(options: () => Options<ComplexTypesData, ThrowOnError> | undefined) { 755 693 return httpResource<ComplexTypesResponse>(() => { ··· 759 697 } 760 698 } 761 699 762 - @Injectable({ 763 - providedIn: 'root' 764 - }) 700 + @Injectable({ providedIn: "root" }) 765 701 export class HeaderServiceResources { 766 702 public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResultFromHeaderData, ThrowOnError> | undefined) { 767 703 return httpResource<unknown>(() => { ··· 771 707 } 772 708 } 773 709 774 - @Injectable({ 775 - providedIn: 'root' 776 - }) 710 + @Injectable({ providedIn: "root" }) 777 711 export class ErrorServiceResources { 778 712 public testErrorCode<ThrowOnError extends boolean = false>(options: () => Options<TestErrorCodeData, ThrowOnError> | undefined) { 779 713 return httpResource<unknown>(() => { ··· 783 717 } 784 718 } 785 719 786 - @Injectable({ 787 - providedIn: 'root' 788 - }) 720 + @Injectable({ providedIn: "root" }) 789 721 export class NonAsciiÆøåÆøÅöôêÊServiceResources { 790 722 public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: () => Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError> | undefined) { 791 723 return httpResource<NonAsciiæøåÆøÅöôêÊ字符串Response>(() => {
+340 -476
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/@angular/common.gen.ts
··· 6 6 import type { Options } from '../sdk.gen'; 7 7 import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; 8 8 9 - export const serviceWithEmptyTagRequest = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>): HttpRequest<unknown> => { 10 - return (options?.client ?? client).requestOptions({ 11 - responseStyle: 'data', 12 - method: 'GET', 13 - url: '/api/v{api-version}/no+tag', 14 - ...options 15 - }); 16 - }; 9 + export const serviceWithEmptyTagRequest = <ThrowOnError extends boolean = false>(options?: Options<ServiceWithEmptyTagData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 10 + responseStyle: "data", 11 + method: "GET", 12 + url: "/api/v{api-version}/no+tag", 13 + ...options 14 + }); 17 15 18 - export const patchApiVbyApiVersionNoTagRequest = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> => { 19 - return (options?.client ?? client).requestOptions({ 20 - responseStyle: 'data', 21 - method: 'PATCH', 22 - url: '/api/v{api-version}/no+tag', 23 - ...options 24 - }); 25 - }; 16 + export const patchApiVbyApiVersionNoTagRequest = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 17 + responseStyle: "data", 18 + method: "PATCH", 19 + url: "/api/v{api-version}/no+tag", 20 + ...options 21 + }); 26 22 27 - export const fooWowRequest = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> => { 28 - return (options?.client ?? client).requestOptions({ 29 - responseStyle: 'data', 30 - method: 'PUT', 31 - url: '/api/v{api-version}/no+tag', 32 - ...options 33 - }); 34 - }; 23 + export const fooWowRequest = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 24 + responseStyle: "data", 25 + method: "PUT", 26 + url: "/api/v{api-version}/no+tag", 27 + ...options 28 + }); 35 29 36 - export const deleteCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 37 - return (options?.client ?? client).requestOptions({ 38 - responseStyle: 'data', 39 - method: 'DELETE', 40 - url: '/api/v{api-version}/simple', 41 - ...options 42 - }); 43 - }; 30 + export const deleteCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 31 + responseStyle: "data", 32 + method: "DELETE", 33 + url: "/api/v{api-version}/simple", 34 + ...options 35 + }); 44 36 45 - export const getCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 46 - return (options?.client ?? client).requestOptions({ 47 - responseStyle: 'data', 48 - method: 'GET', 49 - url: '/api/v{api-version}/simple', 50 - ...options 51 - }); 52 - }; 37 + export const getCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 38 + responseStyle: "data", 39 + method: "GET", 40 + url: "/api/v{api-version}/simple", 41 + ...options 42 + }); 53 43 54 - export const headCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 55 - return (options?.client ?? client).requestOptions({ 56 - responseStyle: 'data', 57 - method: 'HEAD', 58 - url: '/api/v{api-version}/simple', 59 - ...options 60 - }); 61 - }; 44 + export const headCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 45 + responseStyle: "data", 46 + method: "HEAD", 47 + url: "/api/v{api-version}/simple", 48 + ...options 49 + }); 62 50 63 - export const optionsCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 64 - return (options?.client ?? client).requestOptions({ 65 - responseStyle: 'data', 66 - method: 'OPTIONS', 67 - url: '/api/v{api-version}/simple', 68 - ...options 69 - }); 70 - }; 51 + export const optionsCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 52 + responseStyle: "data", 53 + method: "OPTIONS", 54 + url: "/api/v{api-version}/simple", 55 + ...options 56 + }); 71 57 72 - export const patchCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 73 - return (options?.client ?? client).requestOptions({ 74 - responseStyle: 'data', 75 - method: 'PATCH', 76 - url: '/api/v{api-version}/simple', 77 - ...options 78 - }); 79 - }; 58 + export const patchCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 59 + responseStyle: "data", 60 + method: "PATCH", 61 + url: "/api/v{api-version}/simple", 62 + ...options 63 + }); 80 64 81 - export const postCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 82 - return (options?.client ?? client).requestOptions({ 83 - responseStyle: 'data', 84 - method: 'POST', 85 - url: '/api/v{api-version}/simple', 86 - ...options 87 - }); 88 - }; 65 + export const postCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 66 + responseStyle: "data", 67 + method: "POST", 68 + url: "/api/v{api-version}/simple", 69 + ...options 70 + }); 89 71 90 - export const putCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 91 - return (options?.client ?? client).requestOptions({ 92 - responseStyle: 'data', 93 - method: 'PUT', 94 - url: '/api/v{api-version}/simple', 95 - ...options 96 - }); 97 - }; 72 + export const putCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 73 + responseStyle: "data", 74 + method: "PUT", 75 + url: "/api/v{api-version}/simple", 76 + ...options 77 + }); 98 78 99 - export const callWithDescriptionsRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> => { 100 - return (options?.client ?? client).requestOptions({ 101 - responseStyle: 'data', 102 - method: 'POST', 103 - url: '/api/v{api-version}/descriptions/', 104 - ...options 105 - }); 106 - }; 79 + export const callWithDescriptionsRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 80 + responseStyle: "data", 81 + method: "POST", 82 + url: "/api/v{api-version}/descriptions/", 83 + ...options 84 + }); 107 85 108 - export const callWithParametersRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> => { 109 - return (options?.client ?? client).requestOptions({ 110 - responseStyle: 'data', 111 - method: 'POST', 112 - url: '/api/v{api-version}/parameters/{parameterPath}', 113 - ...options 114 - }); 115 - }; 86 + export const callWithParametersRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 87 + responseStyle: "data", 88 + method: "POST", 89 + url: "/api/v{api-version}/parameters/{parameterPath}", 90 + ...options 91 + }); 116 92 117 - export const callWithWeirdParameterNamesRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> => { 118 - return (options?.client ?? client).requestOptions({ 119 - responseStyle: 'data', 120 - method: 'POST', 121 - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 122 - ...options 123 - }); 124 - }; 93 + export const callWithWeirdParameterNamesRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 94 + responseStyle: "data", 95 + method: "POST", 96 + url: "/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}", 97 + ...options 98 + }); 125 99 126 - export const callWithDefaultParametersRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> => { 127 - return (options?.client ?? client).requestOptions({ 128 - responseStyle: 'data', 129 - method: 'GET', 130 - url: '/api/v{api-version}/defaults', 131 - ...options 132 - }); 133 - }; 100 + export const callWithDefaultParametersRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 101 + responseStyle: "data", 102 + method: "GET", 103 + url: "/api/v{api-version}/defaults", 104 + ...options 105 + }); 134 106 135 - export const callWithDefaultOptionalParametersRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> => { 136 - return (options?.client ?? client).requestOptions({ 137 - responseStyle: 'data', 138 - method: 'POST', 139 - url: '/api/v{api-version}/defaults', 140 - ...options 141 - }); 142 - }; 107 + export const callWithDefaultOptionalParametersRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 108 + responseStyle: "data", 109 + method: "POST", 110 + url: "/api/v{api-version}/defaults", 111 + ...options 112 + }); 143 113 144 - export const callToTestOrderOfParamsRequest = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> => { 145 - return (options?.client ?? client).requestOptions({ 146 - responseStyle: 'data', 147 - method: 'PUT', 148 - url: '/api/v{api-version}/defaults', 149 - ...options 150 - }); 151 - }; 114 + export const callToTestOrderOfParamsRequest = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 115 + responseStyle: "data", 116 + method: "PUT", 117 + url: "/api/v{api-version}/defaults", 118 + ...options 119 + }); 152 120 153 - export const duplicateNameRequest = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> => { 154 - return (options?.client ?? client).requestOptions({ 155 - responseStyle: 'data', 156 - method: 'DELETE', 157 - url: '/api/v{api-version}/duplicate', 158 - ...options 159 - }); 160 - }; 121 + export const duplicateNameRequest = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 122 + responseStyle: "data", 123 + method: "DELETE", 124 + url: "/api/v{api-version}/duplicate", 125 + ...options 126 + }); 161 127 162 - export const duplicateName2Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> => { 163 - return (options?.client ?? client).requestOptions({ 164 - responseStyle: 'data', 165 - method: 'GET', 166 - url: '/api/v{api-version}/duplicate', 167 - ...options 168 - }); 169 - }; 128 + export const duplicateName2Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 129 + responseStyle: "data", 130 + method: "GET", 131 + url: "/api/v{api-version}/duplicate", 132 + ...options 133 + }); 170 134 171 - export const duplicateName3Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> => { 172 - return (options?.client ?? client).requestOptions({ 173 - responseStyle: 'data', 174 - method: 'POST', 175 - url: '/api/v{api-version}/duplicate', 176 - ...options 177 - }); 178 - }; 135 + export const duplicateName3Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 136 + responseStyle: "data", 137 + method: "POST", 138 + url: "/api/v{api-version}/duplicate", 139 + ...options 140 + }); 179 141 180 - export const duplicateName4Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> => { 181 - return (options?.client ?? client).requestOptions({ 182 - responseStyle: 'data', 183 - method: 'PUT', 184 - url: '/api/v{api-version}/duplicate', 185 - ...options 186 - }); 187 - }; 142 + export const duplicateName4Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 143 + responseStyle: "data", 144 + method: "PUT", 145 + url: "/api/v{api-version}/duplicate", 146 + ...options 147 + }); 188 148 189 - export const callWithNoContentResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> => { 190 - return (options?.client ?? client).requestOptions({ 191 - responseStyle: 'data', 192 - method: 'GET', 193 - url: '/api/v{api-version}/no-content', 194 - ...options 195 - }); 196 - }; 149 + export const callWithNoContentResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 150 + responseStyle: "data", 151 + method: "GET", 152 + url: "/api/v{api-version}/no-content", 153 + ...options 154 + }); 197 155 198 - export const callWithResponseAndNoContentResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> => { 199 - return (options?.client ?? client).requestOptions({ 200 - responseStyle: 'data', 201 - method: 'GET', 202 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 203 - ...options 204 - }); 205 - }; 156 + export const callWithResponseAndNoContentResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 157 + responseStyle: "data", 158 + method: "GET", 159 + url: "/api/v{api-version}/multiple-tags/response-and-no-content", 160 + ...options 161 + }); 206 162 207 - export const dummyARequest = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> => { 208 - return (options?.client ?? client).requestOptions({ 209 - responseStyle: 'data', 210 - method: 'GET', 211 - url: '/api/v{api-version}/multiple-tags/a', 212 - ...options 213 - }); 214 - }; 163 + export const dummyARequest = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 164 + responseStyle: "data", 165 + method: "GET", 166 + url: "/api/v{api-version}/multiple-tags/a", 167 + ...options 168 + }); 215 169 216 - export const dummyBRequest = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> => { 217 - return (options?.client ?? client).requestOptions({ 218 - responseStyle: 'data', 219 - method: 'GET', 220 - url: '/api/v{api-version}/multiple-tags/b', 221 - ...options 222 - }); 223 - }; 170 + export const dummyBRequest = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 171 + responseStyle: "data", 172 + method: "GET", 173 + url: "/api/v{api-version}/multiple-tags/b", 174 + ...options 175 + }); 224 176 225 - export const callWithResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<unknown> => { 226 - return (options?.client ?? client).requestOptions({ 227 - responseStyle: 'data', 228 - method: 'GET', 229 - url: '/api/v{api-version}/response', 230 - ...options 231 - }); 232 - }; 177 + export const callWithResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 178 + responseStyle: "data", 179 + method: "GET", 180 + url: "/api/v{api-version}/response", 181 + ...options 182 + }); 233 183 234 - export const callWithDuplicateResponsesRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<unknown> => { 235 - return (options?.client ?? client).requestOptions({ 236 - responseStyle: 'data', 237 - method: 'POST', 238 - url: '/api/v{api-version}/response', 239 - ...options 240 - }); 241 - }; 184 + export const callWithDuplicateResponsesRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 185 + responseStyle: "data", 186 + method: "POST", 187 + url: "/api/v{api-version}/response", 188 + ...options 189 + }); 242 190 243 - export const callWithResponsesRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<unknown> => { 244 - return (options?.client ?? client).requestOptions({ 245 - responseStyle: 'data', 246 - method: 'PUT', 247 - url: '/api/v{api-version}/response', 248 - ...options 249 - }); 250 - }; 191 + export const callWithResponsesRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 192 + responseStyle: "data", 193 + method: "PUT", 194 + url: "/api/v{api-version}/response", 195 + ...options 196 + }); 251 197 252 - export const collectionFormatRequest = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> => { 253 - return (options?.client ?? client).requestOptions({ 254 - responseStyle: 'data', 255 - method: 'GET', 256 - url: '/api/v{api-version}/collectionFormat', 257 - ...options 258 - }); 259 - }; 198 + export const collectionFormatRequest = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 199 + responseStyle: "data", 200 + method: "GET", 201 + url: "/api/v{api-version}/collectionFormat", 202 + ...options 203 + }); 260 204 261 - export const typesRequest = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<unknown> => { 262 - return (options?.client ?? client).requestOptions({ 263 - responseStyle: 'data', 264 - method: 'GET', 265 - url: '/api/v{api-version}/types', 266 - ...options 267 - }); 268 - }; 205 + export const typesRequest = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 206 + responseStyle: "data", 207 + method: "GET", 208 + url: "/api/v{api-version}/types", 209 + ...options 210 + }); 269 211 270 - export const complexTypesRequest = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<unknown> => { 271 - return (options?.client ?? client).requestOptions({ 272 - responseStyle: 'data', 273 - method: 'GET', 274 - url: '/api/v{api-version}/complex', 275 - ...options 276 - }); 277 - }; 212 + export const complexTypesRequest = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 213 + responseStyle: "data", 214 + method: "GET", 215 + url: "/api/v{api-version}/complex", 216 + ...options 217 + }); 278 218 279 - export const callWithResultFromHeaderRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> => { 280 - return (options?.client ?? client).requestOptions({ 281 - responseStyle: 'data', 282 - method: 'POST', 283 - url: '/api/v{api-version}/header', 284 - ...options 285 - }); 286 - }; 219 + export const callWithResultFromHeaderRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 220 + responseStyle: "data", 221 + method: "POST", 222 + url: "/api/v{api-version}/header", 223 + ...options 224 + }); 287 225 288 - export const testErrorCodeRequest = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> => { 289 - return (options?.client ?? client).requestOptions({ 290 - responseStyle: 'data', 291 - method: 'POST', 292 - url: '/api/v{api-version}/error', 293 - ...options 294 - }); 295 - }; 226 + export const testErrorCodeRequest = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 227 + responseStyle: "data", 228 + method: "POST", 229 + url: "/api/v{api-version}/error", 230 + ...options 231 + }); 296 232 297 - export const nonAsciiæøåÆøÅöôêÊ字符串Request = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<unknown> => { 298 - return (options?.client ?? client).requestOptions({ 299 - responseStyle: 'data', 300 - method: 'POST', 301 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 302 - ...options 303 - }); 304 - }; 233 + export const nonAsciiæøåÆøÅöôêÊ字符串Request = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 234 + responseStyle: "data", 235 + method: "POST", 236 + url: "/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串", 237 + ...options 238 + }); 305 239 306 240 /** 307 241 * Body should not be unknown 308 242 * 309 243 * Body should not be unknown 310 244 */ 311 - export const postApiVbyApiVersionBodyRequest = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>): HttpRequest<unknown> => { 312 - return (options?.client ?? client).requestOptions({ 313 - responseStyle: 'data', 314 - method: 'POST', 315 - url: '/api/v{api-version}/body', 316 - ...options 317 - }); 318 - }; 245 + export const postApiVbyApiVersionBodyRequest = <ThrowOnError extends boolean = false>(options: Options<PostApiVbyApiVersionBodyData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 246 + responseStyle: "data", 247 + method: "POST", 248 + url: "/api/v{api-version}/body", 249 + ...options 250 + }); 319 251 320 - export const serviceWithEmptyTagResource = <ThrowOnError extends boolean = false>(options?: () => Options<ServiceWithEmptyTagData, ThrowOnError> | undefined) => { 321 - return httpResource<unknown>(() => { 322 - const opts = options ? options() : undefined; 323 - return opts ? serviceWithEmptyTagRequest(opts) : undefined; 324 - }); 325 - }; 252 + export const serviceWithEmptyTagResource = <ThrowOnError extends boolean = false>(options?: () => Options<ServiceWithEmptyTagData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 253 + const opts = options ? options() : undefined; 254 + return opts ? serviceWithEmptyTagRequest(opts) : undefined; 255 + }); 326 256 327 - export const patchApiVbyApiVersionNoTagResource = <ThrowOnError extends boolean = false>(options?: () => Options<PatchApiVbyApiVersionNoTagData, ThrowOnError> | undefined) => { 328 - return httpResource<unknown>(() => { 329 - const opts = options ? options() : undefined; 330 - return opts ? patchApiVbyApiVersionNoTagRequest(opts) : undefined; 331 - }); 332 - }; 257 + export const patchApiVbyApiVersionNoTagResource = <ThrowOnError extends boolean = false>(options?: () => Options<PatchApiVbyApiVersionNoTagData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 258 + const opts = options ? options() : undefined; 259 + return opts ? patchApiVbyApiVersionNoTagRequest(opts) : undefined; 260 + }); 333 261 334 - export const fooWowResource = <ThrowOnError extends boolean = false>(options?: () => Options<FooWowData, ThrowOnError> | undefined) => { 335 - return httpResource<unknown>(() => { 336 - const opts = options ? options() : undefined; 337 - return opts ? fooWowRequest(opts) : undefined; 338 - }); 339 - }; 262 + export const fooWowResource = <ThrowOnError extends boolean = false>(options?: () => Options<FooWowData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 263 + const opts = options ? options() : undefined; 264 + return opts ? fooWowRequest(opts) : undefined; 265 + }); 340 266 341 - export const deleteCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 342 - return httpResource<unknown>(() => { 343 - const opts = options ? options() : undefined; 344 - return opts ? deleteCallWithoutParametersAndResponseRequest(opts) : undefined; 345 - }); 346 - }; 267 + export const deleteCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 268 + const opts = options ? options() : undefined; 269 + return opts ? deleteCallWithoutParametersAndResponseRequest(opts) : undefined; 270 + }); 347 271 348 - export const getCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<GetCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 349 - return httpResource<unknown>(() => { 350 - const opts = options ? options() : undefined; 351 - return opts ? getCallWithoutParametersAndResponseRequest(opts) : undefined; 352 - }); 353 - }; 272 + export const getCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<GetCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 273 + const opts = options ? options() : undefined; 274 + return opts ? getCallWithoutParametersAndResponseRequest(opts) : undefined; 275 + }); 354 276 355 - export const headCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<HeadCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 356 - return httpResource<unknown>(() => { 357 - const opts = options ? options() : undefined; 358 - return opts ? headCallWithoutParametersAndResponseRequest(opts) : undefined; 359 - }); 360 - }; 277 + export const headCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<HeadCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 278 + const opts = options ? options() : undefined; 279 + return opts ? headCallWithoutParametersAndResponseRequest(opts) : undefined; 280 + }); 361 281 362 - export const optionsCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 363 - return httpResource<unknown>(() => { 364 - const opts = options ? options() : undefined; 365 - return opts ? optionsCallWithoutParametersAndResponseRequest(opts) : undefined; 366 - }); 367 - }; 282 + export const optionsCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 283 + const opts = options ? options() : undefined; 284 + return opts ? optionsCallWithoutParametersAndResponseRequest(opts) : undefined; 285 + }); 368 286 369 - export const patchCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PatchCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 370 - return httpResource<unknown>(() => { 371 - const opts = options ? options() : undefined; 372 - return opts ? patchCallWithoutParametersAndResponseRequest(opts) : undefined; 373 - }); 374 - }; 287 + export const patchCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PatchCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 288 + const opts = options ? options() : undefined; 289 + return opts ? patchCallWithoutParametersAndResponseRequest(opts) : undefined; 290 + }); 375 291 376 - export const postCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 377 - return httpResource<unknown>(() => { 378 - const opts = options ? options() : undefined; 379 - return opts ? postCallWithoutParametersAndResponseRequest(opts) : undefined; 380 - }); 381 - }; 292 + export const postCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 293 + const opts = options ? options() : undefined; 294 + return opts ? postCallWithoutParametersAndResponseRequest(opts) : undefined; 295 + }); 382 296 383 - export const putCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PutCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 384 - return httpResource<unknown>(() => { 385 - const opts = options ? options() : undefined; 386 - return opts ? putCallWithoutParametersAndResponseRequest(opts) : undefined; 387 - }); 388 - }; 297 + export const putCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PutCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 298 + const opts = options ? options() : undefined; 299 + return opts ? putCallWithoutParametersAndResponseRequest(opts) : undefined; 300 + }); 389 301 390 - export const callWithDescriptionsResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDescriptionsData, ThrowOnError> | undefined) => { 391 - return httpResource<unknown>(() => { 392 - const opts = options ? options() : undefined; 393 - return opts ? callWithDescriptionsRequest(opts) : undefined; 394 - }); 395 - }; 302 + export const callWithDescriptionsResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDescriptionsData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 303 + const opts = options ? options() : undefined; 304 + return opts ? callWithDescriptionsRequest(opts) : undefined; 305 + }); 396 306 397 - export const callWithParametersResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithParametersData, ThrowOnError> | undefined) => { 398 - return httpResource<unknown>(() => { 399 - const opts = options ? options() : undefined; 400 - return opts ? callWithParametersRequest(opts) : undefined; 401 - }); 402 - }; 307 + export const callWithParametersResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithParametersData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 308 + const opts = options ? options() : undefined; 309 + return opts ? callWithParametersRequest(opts) : undefined; 310 + }); 403 311 404 - export const callWithWeirdParameterNamesResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithWeirdParameterNamesData, ThrowOnError> | undefined) => { 405 - return httpResource<unknown>(() => { 406 - const opts = options ? options() : undefined; 407 - return opts ? callWithWeirdParameterNamesRequest(opts) : undefined; 408 - }); 409 - }; 312 + export const callWithWeirdParameterNamesResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithWeirdParameterNamesData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 313 + const opts = options ? options() : undefined; 314 + return opts ? callWithWeirdParameterNamesRequest(opts) : undefined; 315 + }); 410 316 411 - export const callWithDefaultParametersResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithDefaultParametersData, ThrowOnError> | undefined) => { 412 - return httpResource<unknown>(() => { 413 - const opts = options ? options() : undefined; 414 - return opts ? callWithDefaultParametersRequest(opts) : undefined; 415 - }); 416 - }; 317 + export const callWithDefaultParametersResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithDefaultParametersData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 318 + const opts = options ? options() : undefined; 319 + return opts ? callWithDefaultParametersRequest(opts) : undefined; 320 + }); 417 321 418 - export const callWithDefaultOptionalParametersResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultOptionalParametersData, ThrowOnError> | undefined) => { 419 - return httpResource<unknown>(() => { 420 - const opts = options ? options() : undefined; 421 - return opts ? callWithDefaultOptionalParametersRequest(opts) : undefined; 422 - }); 423 - }; 322 + export const callWithDefaultOptionalParametersResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultOptionalParametersData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 323 + const opts = options ? options() : undefined; 324 + return opts ? callWithDefaultOptionalParametersRequest(opts) : undefined; 325 + }); 424 326 425 - export const callToTestOrderOfParamsResource = <ThrowOnError extends boolean = false>(options: () => Options<CallToTestOrderOfParamsData, ThrowOnError> | undefined) => { 426 - return httpResource<unknown>(() => { 427 - const opts = options ? options() : undefined; 428 - return opts ? callToTestOrderOfParamsRequest(opts) : undefined; 429 - }); 430 - }; 327 + export const callToTestOrderOfParamsResource = <ThrowOnError extends boolean = false>(options: () => Options<CallToTestOrderOfParamsData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 328 + const opts = options ? options() : undefined; 329 + return opts ? callToTestOrderOfParamsRequest(opts) : undefined; 330 + }); 431 331 432 - export const duplicateNameResource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) => { 433 - return httpResource<unknown>(() => { 434 - const opts = options ? options() : undefined; 435 - return opts ? duplicateNameRequest(opts) : undefined; 436 - }); 437 - }; 332 + export const duplicateNameResource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 333 + const opts = options ? options() : undefined; 334 + return opts ? duplicateNameRequest(opts) : undefined; 335 + }); 438 336 439 - export const duplicateName2Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName2Data, ThrowOnError> | undefined) => { 440 - return httpResource<unknown>(() => { 441 - const opts = options ? options() : undefined; 442 - return opts ? duplicateName2Request(opts) : undefined; 443 - }); 444 - }; 337 + export const duplicateName2Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName2Data, ThrowOnError> | undefined) => httpResource<unknown>(() => { 338 + const opts = options ? options() : undefined; 339 + return opts ? duplicateName2Request(opts) : undefined; 340 + }); 445 341 446 - export const duplicateName3Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName3Data, ThrowOnError> | undefined) => { 447 - return httpResource<unknown>(() => { 448 - const opts = options ? options() : undefined; 449 - return opts ? duplicateName3Request(opts) : undefined; 450 - }); 451 - }; 342 + export const duplicateName3Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName3Data, ThrowOnError> | undefined) => httpResource<unknown>(() => { 343 + const opts = options ? options() : undefined; 344 + return opts ? duplicateName3Request(opts) : undefined; 345 + }); 452 346 453 - export const duplicateName4Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName4Data, ThrowOnError> | undefined) => { 454 - return httpResource<unknown>(() => { 455 - const opts = options ? options() : undefined; 456 - return opts ? duplicateName4Request(opts) : undefined; 457 - }); 458 - }; 347 + export const duplicateName4Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName4Data, ThrowOnError> | undefined) => httpResource<unknown>(() => { 348 + const opts = options ? options() : undefined; 349 + return opts ? duplicateName4Request(opts) : undefined; 350 + }); 459 351 460 - export const callWithNoContentResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithNoContentResponseData, ThrowOnError> | undefined) => { 461 - return httpResource<unknown>(() => { 462 - const opts = options ? options() : undefined; 463 - return opts ? callWithNoContentResponseRequest(opts) : undefined; 464 - }); 465 - }; 352 + export const callWithNoContentResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithNoContentResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 353 + const opts = options ? options() : undefined; 354 + return opts ? callWithNoContentResponseRequest(opts) : undefined; 355 + }); 466 356 467 - export const callWithResponseAndNoContentResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) => { 468 - return httpResource<CallWithResponseAndNoContentResponseResponse>(() => { 469 - const opts = options ? options() : undefined; 470 - return opts ? callWithResponseAndNoContentResponseRequest(opts) : undefined; 471 - }); 472 - }; 357 + export const callWithResponseAndNoContentResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) => httpResource<CallWithResponseAndNoContentResponseResponse>(() => { 358 + const opts = options ? options() : undefined; 359 + return opts ? callWithResponseAndNoContentResponseRequest(opts) : undefined; 360 + }); 473 361 474 - export const dummyAResource = <ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) => { 475 - return httpResource<unknown>(() => { 476 - const opts = options ? options() : undefined; 477 - return opts ? dummyARequest(opts) : undefined; 478 - }); 479 - }; 362 + export const dummyAResource = <ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 363 + const opts = options ? options() : undefined; 364 + return opts ? dummyARequest(opts) : undefined; 365 + }); 480 366 481 - export const dummyBResource = <ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) => { 482 - return httpResource<unknown>(() => { 483 - const opts = options ? options() : undefined; 484 - return opts ? dummyBRequest(opts) : undefined; 485 - }); 486 - }; 367 + export const dummyBResource = <ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 368 + const opts = options ? options() : undefined; 369 + return opts ? dummyBRequest(opts) : undefined; 370 + }); 487 371 488 - export const callWithResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseData, ThrowOnError> | undefined) => { 489 - return httpResource<CallWithResponseResponse>(() => { 490 - const opts = options ? options() : undefined; 491 - return opts ? callWithResponseRequest(opts) : undefined; 492 - }); 493 - }; 372 + export const callWithResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseData, ThrowOnError> | undefined) => httpResource<CallWithResponseResponse>(() => { 373 + const opts = options ? options() : undefined; 374 + return opts ? callWithResponseRequest(opts) : undefined; 375 + }); 494 376 495 - export const callWithDuplicateResponsesResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDuplicateResponsesData, ThrowOnError> | undefined) => { 496 - return httpResource<CallWithDuplicateResponsesResponse>(() => { 497 - const opts = options ? options() : undefined; 498 - return opts ? callWithDuplicateResponsesRequest(opts) : undefined; 499 - }); 500 - }; 377 + export const callWithDuplicateResponsesResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDuplicateResponsesData, ThrowOnError> | undefined) => httpResource<CallWithDuplicateResponsesResponse>(() => { 378 + const opts = options ? options() : undefined; 379 + return opts ? callWithDuplicateResponsesRequest(opts) : undefined; 380 + }); 501 381 502 - export const callWithResponsesResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponsesData, ThrowOnError> | undefined) => { 503 - return httpResource<CallWithResponsesResponse>(() => { 504 - const opts = options ? options() : undefined; 505 - return opts ? callWithResponsesRequest(opts) : undefined; 506 - }); 507 - }; 382 + export const callWithResponsesResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponsesData, ThrowOnError> | undefined) => httpResource<CallWithResponsesResponse>(() => { 383 + const opts = options ? options() : undefined; 384 + return opts ? callWithResponsesRequest(opts) : undefined; 385 + }); 508 386 509 - export const collectionFormatResource = <ThrowOnError extends boolean = false>(options: () => Options<CollectionFormatData, ThrowOnError> | undefined) => { 510 - return httpResource<unknown>(() => { 511 - const opts = options ? options() : undefined; 512 - return opts ? collectionFormatRequest(opts) : undefined; 513 - }); 514 - }; 387 + export const collectionFormatResource = <ThrowOnError extends boolean = false>(options: () => Options<CollectionFormatData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 388 + const opts = options ? options() : undefined; 389 + return opts ? collectionFormatRequest(opts) : undefined; 390 + }); 515 391 516 - export const typesResource = <ThrowOnError extends boolean = false>(options: () => Options<TypesData, ThrowOnError> | undefined) => { 517 - return httpResource<TypesResponse>(() => { 518 - const opts = options ? options() : undefined; 519 - return opts ? typesRequest(opts) : undefined; 520 - }); 521 - }; 392 + export const typesResource = <ThrowOnError extends boolean = false>(options: () => Options<TypesData, ThrowOnError> | undefined) => httpResource<TypesResponse>(() => { 393 + const opts = options ? options() : undefined; 394 + return opts ? typesRequest(opts) : undefined; 395 + }); 522 396 523 - export const complexTypesResource = <ThrowOnError extends boolean = false>(options: () => Options<ComplexTypesData, ThrowOnError> | undefined) => { 524 - return httpResource<ComplexTypesResponse>(() => { 525 - const opts = options ? options() : undefined; 526 - return opts ? complexTypesRequest(opts) : undefined; 527 - }); 528 - }; 397 + export const complexTypesResource = <ThrowOnError extends boolean = false>(options: () => Options<ComplexTypesData, ThrowOnError> | undefined) => httpResource<ComplexTypesResponse>(() => { 398 + const opts = options ? options() : undefined; 399 + return opts ? complexTypesRequest(opts) : undefined; 400 + }); 529 401 530 - export const callWithResultFromHeaderResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResultFromHeaderData, ThrowOnError> | undefined) => { 531 - return httpResource<unknown>(() => { 532 - const opts = options ? options() : undefined; 533 - return opts ? callWithResultFromHeaderRequest(opts) : undefined; 534 - }); 535 - }; 402 + export const callWithResultFromHeaderResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResultFromHeaderData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 403 + const opts = options ? options() : undefined; 404 + return opts ? callWithResultFromHeaderRequest(opts) : undefined; 405 + }); 536 406 537 - export const testErrorCodeResource = <ThrowOnError extends boolean = false>(options: () => Options<TestErrorCodeData, ThrowOnError> | undefined) => { 538 - return httpResource<unknown>(() => { 539 - const opts = options ? options() : undefined; 540 - return opts ? testErrorCodeRequest(opts) : undefined; 541 - }); 542 - }; 407 + export const testErrorCodeResource = <ThrowOnError extends boolean = false>(options: () => Options<TestErrorCodeData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 408 + const opts = options ? options() : undefined; 409 + return opts ? testErrorCodeRequest(opts) : undefined; 410 + }); 543 411 544 - export const nonAsciiæøåÆøÅöôêÊ字符串Resource = <ThrowOnError extends boolean = false>(options: () => Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError> | undefined) => { 545 - return httpResource<NonAsciiæøåÆøÅöôêÊ字符串Response>(() => { 546 - const opts = options ? options() : undefined; 547 - return opts ? nonAsciiæøåÆøÅöôêÊ字符串Request(opts) : undefined; 548 - }); 549 - }; 412 + export const nonAsciiæøåÆøÅöôêÊ字符串Resource = <ThrowOnError extends boolean = false>(options: () => Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError> | undefined) => httpResource<NonAsciiæøåÆøÅöôêÊ字符串Response>(() => { 413 + const opts = options ? options() : undefined; 414 + return opts ? nonAsciiæøåÆøÅöôêÊ字符串Request(opts) : undefined; 415 + }); 550 416 551 417 /** 552 418 * Body should not be unknown 553 419 * 554 420 * Body should not be unknown 555 421 */ 556 - export const postApiVbyApiVersionBodyResource = <ThrowOnError extends boolean = false>(options: () => Options<PostApiVbyApiVersionBodyData, ThrowOnError> | undefined) => { 557 - return httpResource<PostApiVbyApiVersionBodyResponse>(() => { 558 - const opts = options ? options() : undefined; 559 - return opts ? postApiVbyApiVersionBodyRequest(opts) : undefined; 560 - }); 561 - }; 422 + export const postApiVbyApiVersionBodyResource = <ThrowOnError extends boolean = false>(options: () => Options<PostApiVbyApiVersionBodyData, ThrowOnError> | undefined) => httpResource<PostApiVbyApiVersionBodyResponse>(() => { 423 + const opts = options ? options() : undefined; 424 + return opts ? postApiVbyApiVersionBodyRequest(opts) : undefined; 425 + });
+202 -294
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts
··· 7 7 import type { Options } from '../sdk.gen'; 8 8 import type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen'; 9 9 10 - @Injectable({ 11 - providedIn: 'root' 12 - }) 10 + @Injectable({ providedIn: "root" }) 13 11 export class DefaultServiceRequests { 14 12 public export<ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>): HttpRequest<unknown> { 15 13 return (options?.client ?? client).requestOptions({ 16 - responseStyle: 'data', 17 - method: 'GET', 18 - url: '/api/v{api-version}/no+tag', 14 + responseStyle: "data", 15 + method: "GET", 16 + url: "/api/v{api-version}/no+tag", 19 17 ...options 20 18 }); 21 19 } 22 20 23 21 public patchApiVbyApiVersionNoTag<ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> { 24 22 return (options?.client ?? client).requestOptions({ 25 - responseStyle: 'data', 26 - method: 'PATCH', 27 - url: '/api/v{api-version}/no+tag', 23 + responseStyle: "data", 24 + method: "PATCH", 25 + url: "/api/v{api-version}/no+tag", 28 26 ...options 29 27 }); 30 28 } 31 29 32 30 public import<ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>): HttpRequest<unknown> { 33 31 return (options?.client ?? client).requestOptions({ 34 - responseStyle: 'data', 35 - method: 'POST', 36 - url: '/api/v{api-version}/no+tag', 32 + responseStyle: "data", 33 + method: "POST", 34 + url: "/api/v{api-version}/no+tag", 37 35 ...options 38 36 }); 39 37 } 40 38 41 39 public fooWow<ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> { 42 40 return (options?.client ?? client).requestOptions({ 43 - responseStyle: 'data', 44 - method: 'PUT', 45 - url: '/api/v{api-version}/no+tag', 41 + responseStyle: "data", 42 + method: "PUT", 43 + url: "/api/v{api-version}/no+tag", 46 44 ...options 47 45 }); 48 46 } 49 47 50 48 public getApiVbyApiVersionSimpleOperation<ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>): HttpRequest<unknown> { 51 49 return (options?.client ?? client).requestOptions({ 52 - responseStyle: 'data', 53 - method: 'GET', 54 - url: '/api/v{api-version}/simple:operation', 50 + responseStyle: "data", 51 + method: "GET", 52 + url: "/api/v{api-version}/simple:operation", 55 53 ...options 56 54 }); 57 55 } ··· 60 58 export class ODataControllerServiceRequests { 61 59 public apiVVersionODataControllerCount<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>): HttpRequest<unknown> { 62 60 return (options?.client ?? client).requestOptions({ 63 - responseStyle: 'data', 64 - method: 'GET', 65 - url: '/api/v{api-version}/simple/$count', 61 + responseStyle: "data", 62 + method: "GET", 63 + url: "/api/v{api-version}/simple/$count", 66 64 ...options 67 65 }); 68 66 } ··· 76 74 vVersionService = new VVersionServiceRequests(); 77 75 } 78 76 79 - @Injectable({ 80 - providedIn: 'root' 81 - }) 77 + @Injectable({ providedIn: "root" }) 82 78 export class SimpleServiceRequests { 83 79 public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 84 80 return (options?.client ?? client).requestOptions({ 85 - responseStyle: 'data', 86 - method: 'DELETE', 87 - url: '/api/v{api-version}/simple', 81 + responseStyle: "data", 82 + method: "DELETE", 83 + url: "/api/v{api-version}/simple", 88 84 ...options 89 85 }); 90 86 } 91 87 92 88 public getCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 93 89 return (options?.client ?? client).requestOptions({ 94 - responseStyle: 'data', 95 - method: 'GET', 96 - url: '/api/v{api-version}/simple', 90 + responseStyle: "data", 91 + method: "GET", 92 + url: "/api/v{api-version}/simple", 97 93 ...options 98 94 }); 99 95 } 100 96 101 97 public headCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 102 98 return (options?.client ?? client).requestOptions({ 103 - responseStyle: 'data', 104 - method: 'HEAD', 105 - url: '/api/v{api-version}/simple', 99 + responseStyle: "data", 100 + method: "HEAD", 101 + url: "/api/v{api-version}/simple", 106 102 ...options 107 103 }); 108 104 } 109 105 110 106 public optionsCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 111 107 return (options?.client ?? client).requestOptions({ 112 - responseStyle: 'data', 113 - method: 'OPTIONS', 114 - url: '/api/v{api-version}/simple', 108 + responseStyle: "data", 109 + method: "OPTIONS", 110 + url: "/api/v{api-version}/simple", 115 111 ...options 116 112 }); 117 113 } 118 114 119 115 public patchCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 120 116 return (options?.client ?? client).requestOptions({ 121 - responseStyle: 'data', 122 - method: 'PATCH', 123 - url: '/api/v{api-version}/simple', 117 + responseStyle: "data", 118 + method: "PATCH", 119 + url: "/api/v{api-version}/simple", 124 120 ...options 125 121 }); 126 122 } 127 123 128 124 public postCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 129 125 return (options?.client ?? client).requestOptions({ 130 - responseStyle: 'data', 131 - method: 'POST', 132 - url: '/api/v{api-version}/simple', 126 + responseStyle: "data", 127 + method: "POST", 128 + url: "/api/v{api-version}/simple", 133 129 ...options 134 130 }); 135 131 } 136 132 137 133 public putCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 138 134 return (options?.client ?? client).requestOptions({ 139 - responseStyle: 'data', 140 - method: 'PUT', 141 - url: '/api/v{api-version}/simple', 135 + responseStyle: "data", 136 + method: "PUT", 137 + url: "/api/v{api-version}/simple", 142 138 ...options 143 139 }); 144 140 } 145 141 apiService = new ApiServiceRequests(); 146 142 } 147 143 148 - @Injectable({ 149 - providedIn: 'root' 150 - }) 144 + @Injectable({ providedIn: "root" }) 151 145 export class ParametersServiceRequests { 152 146 public deleteFoo<ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>): HttpRequest<unknown> { 153 147 return (options?.client ?? client).requestOptions({ 154 - responseStyle: 'data', 155 - method: 'DELETE', 156 - url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', 148 + responseStyle: "data", 149 + method: "DELETE", 150 + url: "/api/v{api-version}/foo/{foo_param}/bar/{BarParam}", 157 151 ...options 158 152 }); 159 153 } 160 154 161 155 public callWithParameters<ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> { 162 156 return (options?.client ?? client).requestOptions({ 163 - responseStyle: 'data', 164 - method: 'POST', 165 - url: '/api/v{api-version}/parameters/{parameterPath}', 157 + responseStyle: "data", 158 + method: "POST", 159 + url: "/api/v{api-version}/parameters/{parameterPath}", 166 160 ...options 167 161 }); 168 162 } 169 163 170 164 public callWithWeirdParameterNames<ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> { 171 165 return (options?.client ?? client).requestOptions({ 172 - responseStyle: 'data', 173 - method: 'POST', 174 - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 166 + responseStyle: "data", 167 + method: "POST", 168 + url: "/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}", 175 169 ...options 176 170 }); 177 171 } 178 172 179 173 public getCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> { 180 174 return (options?.client ?? client).requestOptions({ 181 - responseStyle: 'data', 182 - method: 'GET', 183 - url: '/api/v{api-version}/parameters', 175 + responseStyle: "data", 176 + method: "GET", 177 + url: "/api/v{api-version}/parameters", 184 178 ...options 185 179 }); 186 180 } 187 181 188 182 public postCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> { 189 183 return (options?.client ?? client).requestOptions({ 190 - responseStyle: 'data', 191 - method: 'POST', 192 - url: '/api/v{api-version}/parameters', 184 + responseStyle: "data", 185 + method: "POST", 186 + url: "/api/v{api-version}/parameters", 193 187 ...options 194 188 }); 195 189 } 196 190 } 197 191 198 - @Injectable({ 199 - providedIn: 'root' 200 - }) 192 + @Injectable({ providedIn: "root" }) 201 193 export class DescriptionsServiceRequests { 202 194 public callWithDescriptions<ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> { 203 195 return (options?.client ?? client).requestOptions({ 204 - responseStyle: 'data', 205 - method: 'POST', 206 - url: '/api/v{api-version}/descriptions', 196 + responseStyle: "data", 197 + method: "POST", 198 + url: "/api/v{api-version}/descriptions", 207 199 ...options 208 200 }); 209 201 } 210 202 } 211 203 212 - @Injectable({ 213 - providedIn: 'root' 214 - }) 204 + @Injectable({ providedIn: "root" }) 215 205 export class DeprecatedServiceRequests { 216 206 /** 217 207 * @deprecated 218 208 */ 219 209 public deprecatedCall<ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>): HttpRequest<unknown> { 220 210 return (options?.client ?? client).requestOptions({ 221 - responseStyle: 'data', 222 - method: 'POST', 223 - url: '/api/v{api-version}/parameters/deprecated', 211 + responseStyle: "data", 212 + method: "POST", 213 + url: "/api/v{api-version}/parameters/deprecated", 224 214 ...options 225 215 }); 226 216 } 227 217 } 228 218 229 - @Injectable({ 230 - providedIn: 'root' 231 - }) 219 + @Injectable({ providedIn: "root" }) 232 220 export class RequestBodyServiceRequests { 233 221 public postApiVbyApiVersionRequestBody<ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>): HttpRequest<unknown> { 234 222 return (options?.client ?? client).requestOptions({ 235 - responseStyle: 'data', 236 - method: 'POST', 237 - url: '/api/v{api-version}/requestBody', 223 + responseStyle: "data", 224 + method: "POST", 225 + url: "/api/v{api-version}/requestBody", 238 226 ...options 239 227 }); 240 228 } 241 229 } 242 230 243 - @Injectable({ 244 - providedIn: 'root' 245 - }) 231 + @Injectable({ providedIn: "root" }) 246 232 export class FormDataServiceRequests { 247 233 public postApiVbyApiVersionFormData<ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>): HttpRequest<unknown> { 248 234 return (options?.client ?? client).requestOptions({ 249 - responseStyle: 'data', 250 - method: 'POST', 251 - url: '/api/v{api-version}/formData', 235 + responseStyle: "data", 236 + method: "POST", 237 + url: "/api/v{api-version}/formData", 252 238 ...options 253 239 }); 254 240 } 255 241 } 256 242 257 - @Injectable({ 258 - providedIn: 'root' 259 - }) 243 + @Injectable({ providedIn: "root" }) 260 244 export class DefaultsServiceRequests { 261 245 public callWithDefaultParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> { 262 246 return (options?.client ?? client).requestOptions({ 263 - responseStyle: 'data', 264 - method: 'GET', 265 - url: '/api/v{api-version}/defaults', 247 + responseStyle: "data", 248 + method: "GET", 249 + url: "/api/v{api-version}/defaults", 266 250 ...options 267 251 }); 268 252 } 269 253 270 254 public callWithDefaultOptionalParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> { 271 255 return (options?.client ?? client).requestOptions({ 272 - responseStyle: 'data', 273 - method: 'POST', 274 - url: '/api/v{api-version}/defaults', 256 + responseStyle: "data", 257 + method: "POST", 258 + url: "/api/v{api-version}/defaults", 275 259 ...options 276 260 }); 277 261 } 278 262 279 263 public callToTestOrderOfParams<ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> { 280 264 return (options?.client ?? client).requestOptions({ 281 - responseStyle: 'data', 282 - method: 'PUT', 283 - url: '/api/v{api-version}/defaults', 265 + responseStyle: "data", 266 + method: "PUT", 267 + url: "/api/v{api-version}/defaults", 284 268 ...options 285 269 }); 286 270 } 287 271 } 288 272 289 - @Injectable({ 290 - providedIn: 'root' 291 - }) 273 + @Injectable({ providedIn: "root" }) 292 274 export class DuplicateServiceRequests { 293 275 public duplicateName<ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> { 294 276 return (options?.client ?? client).requestOptions({ 295 - responseStyle: 'data', 296 - method: 'DELETE', 297 - url: '/api/v{api-version}/duplicate', 277 + responseStyle: "data", 278 + method: "DELETE", 279 + url: "/api/v{api-version}/duplicate", 298 280 ...options 299 281 }); 300 282 } 301 283 302 284 public duplicateName2<ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> { 303 285 return (options?.client ?? client).requestOptions({ 304 - responseStyle: 'data', 305 - method: 'GET', 306 - url: '/api/v{api-version}/duplicate', 286 + responseStyle: "data", 287 + method: "GET", 288 + url: "/api/v{api-version}/duplicate", 307 289 ...options 308 290 }); 309 291 } 310 292 311 293 public duplicateName3<ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> { 312 294 return (options?.client ?? client).requestOptions({ 313 - responseStyle: 'data', 314 - method: 'POST', 315 - url: '/api/v{api-version}/duplicate', 295 + responseStyle: "data", 296 + method: "POST", 297 + url: "/api/v{api-version}/duplicate", 316 298 ...options 317 299 }); 318 300 } 319 301 320 302 public duplicateName4<ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> { 321 303 return (options?.client ?? client).requestOptions({ 322 - responseStyle: 'data', 323 - method: 'PUT', 324 - url: '/api/v{api-version}/duplicate', 304 + responseStyle: "data", 305 + method: "PUT", 306 + url: "/api/v{api-version}/duplicate", 325 307 ...options 326 308 }); 327 309 } 328 310 } 329 311 330 - @Injectable({ 331 - providedIn: 'root' 332 - }) 312 + @Injectable({ providedIn: "root" }) 333 313 export class NoContentServiceRequests { 334 314 public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 335 315 return (options?.client ?? client).requestOptions({ 336 - responseStyle: 'data', 337 - method: 'GET', 338 - url: '/api/v{api-version}/no-content', 316 + responseStyle: "data", 317 + method: "GET", 318 + url: "/api/v{api-version}/no-content", 339 319 ...options 340 320 }); 341 321 } 342 322 343 323 public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 344 324 return (options?.client ?? client).requestOptions({ 345 - responseStyle: 'data', 346 - method: 'GET', 347 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 325 + responseStyle: "data", 326 + method: "GET", 327 + url: "/api/v{api-version}/multiple-tags/response-and-no-content", 348 328 ...options 349 329 }); 350 330 } 351 331 } 352 332 353 - @Injectable({ 354 - providedIn: 'root' 355 - }) 333 + @Injectable({ providedIn: "root" }) 356 334 export class ResponseServiceRequests { 357 335 public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 358 336 return (options?.client ?? client).requestOptions({ 359 - responseStyle: 'data', 360 - method: 'GET', 361 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 337 + responseStyle: "data", 338 + method: "GET", 339 + url: "/api/v{api-version}/multiple-tags/response-and-no-content", 362 340 ...options 363 341 }); 364 342 } 365 343 366 344 public callWithResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<unknown> { 367 345 return (options?.client ?? client).requestOptions({ 368 - responseStyle: 'data', 369 - method: 'GET', 370 - url: '/api/v{api-version}/response', 346 + responseStyle: "data", 347 + method: "GET", 348 + url: "/api/v{api-version}/response", 371 349 ...options 372 350 }); 373 351 } 374 352 375 353 public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<unknown> { 376 354 return (options?.client ?? client).requestOptions({ 377 - responseStyle: 'data', 378 - method: 'POST', 379 - url: '/api/v{api-version}/response', 355 + responseStyle: "data", 356 + method: "POST", 357 + url: "/api/v{api-version}/response", 380 358 ...options 381 359 }); 382 360 } 383 361 384 362 public callWithResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<unknown> { 385 363 return (options?.client ?? client).requestOptions({ 386 - responseStyle: 'data', 387 - method: 'PUT', 388 - url: '/api/v{api-version}/response', 364 + responseStyle: "data", 365 + method: "PUT", 366 + url: "/api/v{api-version}/response", 389 367 ...options 390 368 }); 391 369 } 392 370 } 393 371 394 - @Injectable({ 395 - providedIn: 'root' 396 - }) 372 + @Injectable({ providedIn: "root" }) 397 373 export class MultipleTags1ServiceRequests { 398 374 public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> { 399 375 return (options?.client ?? client).requestOptions({ 400 - responseStyle: 'data', 401 - method: 'GET', 402 - url: '/api/v{api-version}/multiple-tags/a', 376 + responseStyle: "data", 377 + method: "GET", 378 + url: "/api/v{api-version}/multiple-tags/a", 403 379 ...options 404 380 }); 405 381 } 406 382 407 383 public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 408 384 return (options?.client ?? client).requestOptions({ 409 - responseStyle: 'data', 410 - method: 'GET', 411 - url: '/api/v{api-version}/multiple-tags/b', 385 + responseStyle: "data", 386 + method: "GET", 387 + url: "/api/v{api-version}/multiple-tags/b", 412 388 ...options 413 389 }); 414 390 } 415 391 } 416 392 417 - @Injectable({ 418 - providedIn: 'root' 419 - }) 393 + @Injectable({ providedIn: "root" }) 420 394 export class MultipleTags2ServiceRequests { 421 395 public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> { 422 396 return (options?.client ?? client).requestOptions({ 423 - responseStyle: 'data', 424 - method: 'GET', 425 - url: '/api/v{api-version}/multiple-tags/a', 397 + responseStyle: "data", 398 + method: "GET", 399 + url: "/api/v{api-version}/multiple-tags/a", 426 400 ...options 427 401 }); 428 402 } 429 403 430 404 public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 431 405 return (options?.client ?? client).requestOptions({ 432 - responseStyle: 'data', 433 - method: 'GET', 434 - url: '/api/v{api-version}/multiple-tags/b', 406 + responseStyle: "data", 407 + method: "GET", 408 + url: "/api/v{api-version}/multiple-tags/b", 435 409 ...options 436 410 }); 437 411 } 438 412 } 439 413 440 - @Injectable({ 441 - providedIn: 'root' 442 - }) 414 + @Injectable({ providedIn: "root" }) 443 415 export class MultipleTags3ServiceRequests { 444 416 public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 445 417 return (options?.client ?? client).requestOptions({ 446 - responseStyle: 'data', 447 - method: 'GET', 448 - url: '/api/v{api-version}/multiple-tags/b', 418 + responseStyle: "data", 419 + method: "GET", 420 + url: "/api/v{api-version}/multiple-tags/b", 449 421 ...options 450 422 }); 451 423 } 452 424 } 453 425 454 - @Injectable({ 455 - providedIn: 'root' 456 - }) 426 + @Injectable({ providedIn: "root" }) 457 427 export class CollectionFormatServiceRequests { 458 428 public collectionFormat<ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> { 459 429 return (options?.client ?? client).requestOptions({ 460 - responseStyle: 'data', 461 - method: 'GET', 462 - url: '/api/v{api-version}/collectionFormat', 430 + responseStyle: "data", 431 + method: "GET", 432 + url: "/api/v{api-version}/collectionFormat", 463 433 ...options 464 434 }); 465 435 } 466 436 } 467 437 468 - @Injectable({ 469 - providedIn: 'root' 470 - }) 438 + @Injectable({ providedIn: "root" }) 471 439 export class TypesServiceRequests { 472 440 public types<ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<unknown> { 473 441 return (options?.client ?? client).requestOptions({ 474 - responseStyle: 'data', 475 - method: 'GET', 476 - url: '/api/v{api-version}/types', 442 + responseStyle: "data", 443 + method: "GET", 444 + url: "/api/v{api-version}/types", 477 445 ...options 478 446 }); 479 447 } 480 448 } 481 449 482 - @Injectable({ 483 - providedIn: 'root' 484 - }) 450 + @Injectable({ providedIn: "root" }) 485 451 export class UploadServiceRequests { 486 452 public uploadFile<ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): HttpRequest<unknown> { 487 453 return (options?.client ?? client).requestOptions({ 488 - responseStyle: 'data', 489 - method: 'POST', 490 - url: '/api/v{api-version}/upload', 454 + responseStyle: "data", 455 + method: "POST", 456 + url: "/api/v{api-version}/upload", 491 457 ...options 492 458 }); 493 459 } 494 460 } 495 461 496 - @Injectable({ 497 - providedIn: 'root' 498 - }) 462 + @Injectable({ providedIn: "root" }) 499 463 export class FileResponseServiceRequests { 500 464 public fileResponse<ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>): HttpRequest<unknown> { 501 465 return (options?.client ?? client).requestOptions({ 502 - responseStyle: 'data', 503 - method: 'GET', 504 - url: '/api/v{api-version}/file/{id}', 466 + responseStyle: "data", 467 + method: "GET", 468 + url: "/api/v{api-version}/file/{id}", 505 469 ...options 506 470 }); 507 471 } 508 472 } 509 473 510 - @Injectable({ 511 - providedIn: 'root' 512 - }) 474 + @Injectable({ providedIn: "root" }) 513 475 export class ComplexServiceRequests { 514 476 public complexTypes<ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<unknown> { 515 477 return (options?.client ?? client).requestOptions({ 516 - responseStyle: 'data', 517 - method: 'GET', 518 - url: '/api/v{api-version}/complex', 478 + responseStyle: "data", 479 + method: "GET", 480 + url: "/api/v{api-version}/complex", 519 481 ...options 520 482 }); 521 483 } 522 484 523 485 public complexParams<ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>): HttpRequest<unknown> { 524 486 return (options?.client ?? client).requestOptions({ 525 - responseStyle: 'data', 526 - method: 'PUT', 527 - url: '/api/v{api-version}/complex/{id}', 487 + responseStyle: "data", 488 + method: "PUT", 489 + url: "/api/v{api-version}/complex/{id}", 528 490 ...options 529 491 }); 530 492 } 531 493 } 532 494 533 - @Injectable({ 534 - providedIn: 'root' 535 - }) 495 + @Injectable({ providedIn: "root" }) 536 496 export class MultipartServiceRequests { 537 497 public multipartResponse<ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>): HttpRequest<unknown> { 538 498 return (options?.client ?? client).requestOptions({ 539 - responseStyle: 'data', 540 - method: 'GET', 541 - url: '/api/v{api-version}/multipart', 499 + responseStyle: "data", 500 + method: "GET", 501 + url: "/api/v{api-version}/multipart", 542 502 ...options 543 503 }); 544 504 } 545 505 546 506 public multipartRequest<ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>): HttpRequest<unknown> { 547 507 return (options?.client ?? client).requestOptions({ 548 - responseStyle: 'data', 549 - method: 'POST', 550 - url: '/api/v{api-version}/multipart', 508 + responseStyle: "data", 509 + method: "POST", 510 + url: "/api/v{api-version}/multipart", 551 511 ...options 552 512 }); 553 513 } 554 514 } 555 515 556 - @Injectable({ 557 - providedIn: 'root' 558 - }) 516 + @Injectable({ providedIn: "root" }) 559 517 export class HeaderServiceRequests { 560 518 public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> { 561 519 return (options?.client ?? client).requestOptions({ 562 - responseStyle: 'data', 563 - method: 'POST', 564 - url: '/api/v{api-version}/header', 520 + responseStyle: "data", 521 + method: "POST", 522 + url: "/api/v{api-version}/header", 565 523 ...options 566 524 }); 567 525 } 568 526 } 569 527 570 - @Injectable({ 571 - providedIn: 'root' 572 - }) 528 + @Injectable({ providedIn: "root" }) 573 529 export class ErrorServiceRequests { 574 530 public testErrorCode<ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> { 575 531 return (options?.client ?? client).requestOptions({ 576 - responseStyle: 'data', 577 - method: 'POST', 578 - url: '/api/v{api-version}/error', 532 + responseStyle: "data", 533 + method: "POST", 534 + url: "/api/v{api-version}/error", 579 535 ...options 580 536 }); 581 537 } 582 538 } 583 539 584 - @Injectable({ 585 - providedIn: 'root' 586 - }) 540 + @Injectable({ providedIn: "root" }) 587 541 export class NonAsciiÆøåÆøÅöôêÊServiceRequests { 588 542 public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<unknown> { 589 543 return (options?.client ?? client).requestOptions({ 590 - responseStyle: 'data', 591 - method: 'POST', 592 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 544 + responseStyle: "data", 545 + method: "POST", 546 + url: "/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串", 593 547 ...options 594 548 }); 595 549 } ··· 599 553 */ 600 554 public putWithFormUrlEncoded<ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>): HttpRequest<unknown> { 601 555 return (options?.client ?? client).requestOptions({ 602 - responseStyle: 'data', 603 - method: 'PUT', 604 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 556 + responseStyle: "data", 557 + method: "PUT", 558 + url: "/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串", 605 559 ...options 606 560 }); 607 561 } 608 562 } 609 563 610 - @Injectable({ 611 - providedIn: 'root' 612 - }) 564 + @Injectable({ providedIn: "root" }) 613 565 export class DefaultServiceResources { 614 566 public export<ThrowOnError extends boolean = false>(options?: () => Options<ExportData, ThrowOnError> | undefined) { 615 567 return httpResource<unknown>(() => { ··· 664 616 vVersionService = new VVersionServiceResources(); 665 617 } 666 618 667 - @Injectable({ 668 - providedIn: 'root' 669 - }) 619 + @Injectable({ providedIn: "root" }) 670 620 export class SimpleServiceResources { 671 621 public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError> | undefined) { 672 622 return httpResource<unknown>(() => { ··· 719 669 apiService = new ApiServiceResources(); 720 670 } 721 671 722 - @Injectable({ 723 - providedIn: 'root' 724 - }) 672 + @Injectable({ providedIn: "root" }) 725 673 export class ParametersServiceResources { 726 674 public deleteFoo<ThrowOnError extends boolean = false>(options: () => Options<DeleteFooData3, ThrowOnError> | undefined) { 727 675 return httpResource<unknown>(() => { ··· 759 707 } 760 708 } 761 709 762 - @Injectable({ 763 - providedIn: 'root' 764 - }) 710 + @Injectable({ providedIn: "root" }) 765 711 export class DescriptionsServiceResources { 766 712 public callWithDescriptions<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDescriptionsData, ThrowOnError> | undefined) { 767 713 return httpResource<unknown>(() => { ··· 771 717 } 772 718 } 773 719 774 - @Injectable({ 775 - providedIn: 'root' 776 - }) 720 + @Injectable({ providedIn: "root" }) 777 721 export class DeprecatedServiceResources { 778 722 /** 779 723 * @deprecated ··· 786 730 } 787 731 } 788 732 789 - @Injectable({ 790 - providedIn: 'root' 791 - }) 733 + @Injectable({ providedIn: "root" }) 792 734 export class RequestBodyServiceResources { 793 735 public postApiVbyApiVersionRequestBody<ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError> | undefined) { 794 736 return httpResource<unknown>(() => { ··· 798 740 } 799 741 } 800 742 801 - @Injectable({ 802 - providedIn: 'root' 803 - }) 743 + @Injectable({ providedIn: "root" }) 804 744 export class FormDataServiceResources { 805 745 public postApiVbyApiVersionFormData<ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionFormDataData, ThrowOnError> | undefined) { 806 746 return httpResource<unknown>(() => { ··· 810 750 } 811 751 } 812 752 813 - @Injectable({ 814 - providedIn: 'root' 815 - }) 753 + @Injectable({ providedIn: "root" }) 816 754 export class DefaultsServiceResources { 817 755 public callWithDefaultParameters<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultParametersData, ThrowOnError> | undefined) { 818 756 return httpResource<unknown>(() => { ··· 836 774 } 837 775 } 838 776 839 - @Injectable({ 840 - providedIn: 'root' 841 - }) 777 + @Injectable({ providedIn: "root" }) 842 778 export class DuplicateServiceResources { 843 779 public duplicateName<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) { 844 780 return httpResource<unknown>(() => { ··· 869 805 } 870 806 } 871 807 872 - @Injectable({ 873 - providedIn: 'root' 874 - }) 808 + @Injectable({ providedIn: "root" }) 875 809 export class NoContentServiceResources { 876 810 public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithNoContentResponseData, ThrowOnError> | undefined) { 877 811 return httpResource<CallWithNoContentResponseResponse>(() => { ··· 888 822 } 889 823 } 890 824 891 - @Injectable({ 892 - providedIn: 'root' 893 - }) 825 + @Injectable({ providedIn: "root" }) 894 826 export class ResponseServiceResources { 895 827 public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) { 896 828 return httpResource<CallWithResponseAndNoContentResponseResponse>(() => { ··· 921 853 } 922 854 } 923 855 924 - @Injectable({ 925 - providedIn: 'root' 926 - }) 856 + @Injectable({ providedIn: "root" }) 927 857 export class MultipleTags1ServiceResources { 928 858 public dummyA<ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) { 929 859 return httpResource<DummyAResponse>(() => { ··· 940 870 } 941 871 } 942 872 943 - @Injectable({ 944 - providedIn: 'root' 945 - }) 873 + @Injectable({ providedIn: "root" }) 946 874 export class MultipleTags2ServiceResources { 947 875 public dummyA<ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) { 948 876 return httpResource<DummyAResponse>(() => { ··· 959 887 } 960 888 } 961 889 962 - @Injectable({ 963 - providedIn: 'root' 964 - }) 890 + @Injectable({ providedIn: "root" }) 965 891 export class MultipleTags3ServiceResources { 966 892 public dummyB<ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) { 967 893 return httpResource<DummyBResponse>(() => { ··· 971 897 } 972 898 } 973 899 974 - @Injectable({ 975 - providedIn: 'root' 976 - }) 900 + @Injectable({ providedIn: "root" }) 977 901 export class CollectionFormatServiceResources { 978 902 public collectionFormat<ThrowOnError extends boolean = false>(options: () => Options<CollectionFormatData, ThrowOnError> | undefined) { 979 903 return httpResource<unknown>(() => { ··· 983 907 } 984 908 } 985 909 986 - @Injectable({ 987 - providedIn: 'root' 988 - }) 910 + @Injectable({ providedIn: "root" }) 989 911 export class TypesServiceResources { 990 912 public types<ThrowOnError extends boolean = false>(options: () => Options<TypesData, ThrowOnError> | undefined) { 991 913 return httpResource<TypesResponse>(() => { ··· 995 917 } 996 918 } 997 919 998 - @Injectable({ 999 - providedIn: 'root' 1000 - }) 920 + @Injectable({ providedIn: "root" }) 1001 921 export class UploadServiceResources { 1002 922 public uploadFile<ThrowOnError extends boolean = false>(options: () => Options<UploadFileData, ThrowOnError> | undefined) { 1003 923 return httpResource<UploadFileResponse>(() => { ··· 1007 927 } 1008 928 } 1009 929 1010 - @Injectable({ 1011 - providedIn: 'root' 1012 - }) 930 + @Injectable({ providedIn: "root" }) 1013 931 export class FileResponseServiceResources { 1014 932 public fileResponse<ThrowOnError extends boolean = false>(options: () => Options<FileResponseData, ThrowOnError> | undefined) { 1015 933 return httpResource<FileResponseResponse>(() => { ··· 1019 937 } 1020 938 } 1021 939 1022 - @Injectable({ 1023 - providedIn: 'root' 1024 - }) 940 + @Injectable({ providedIn: "root" }) 1025 941 export class ComplexServiceResources { 1026 942 public complexTypes<ThrowOnError extends boolean = false>(options: () => Options<ComplexTypesData, ThrowOnError> | undefined) { 1027 943 return httpResource<ComplexTypesResponse>(() => { ··· 1038 954 } 1039 955 } 1040 956 1041 - @Injectable({ 1042 - providedIn: 'root' 1043 - }) 957 + @Injectable({ providedIn: "root" }) 1044 958 export class MultipartServiceResources { 1045 959 public multipartResponse<ThrowOnError extends boolean = false>(options?: () => Options<MultipartResponseData, ThrowOnError> | undefined) { 1046 960 return httpResource<MultipartResponseResponse>(() => { ··· 1057 971 } 1058 972 } 1059 973 1060 - @Injectable({ 1061 - providedIn: 'root' 1062 - }) 974 + @Injectable({ providedIn: "root" }) 1063 975 export class HeaderServiceResources { 1064 976 public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResultFromHeaderData, ThrowOnError> | undefined) { 1065 977 return httpResource<unknown>(() => { ··· 1069 981 } 1070 982 } 1071 983 1072 - @Injectable({ 1073 - providedIn: 'root' 1074 - }) 984 + @Injectable({ providedIn: "root" }) 1075 985 export class ErrorServiceResources { 1076 986 public testErrorCode<ThrowOnError extends boolean = false>(options: () => Options<TestErrorCodeData, ThrowOnError> | undefined) { 1077 987 return httpResource<unknown>(() => { ··· 1081 991 } 1082 992 } 1083 993 1084 - @Injectable({ 1085 - providedIn: 'root' 1086 - }) 994 + @Injectable({ providedIn: "root" }) 1087 995 export class NonAsciiÆøåÆøÅöôêÊServiceResources { 1088 996 public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: () => Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError> | undefined) { 1089 997 return httpResource<NonAsciiæøåÆøÅöôêÊ字符串Response>(() => {
+480 -672
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/@angular/common.gen.ts
··· 6 6 import type { Options } from '../sdk.gen'; 7 7 import type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen'; 8 8 9 - export const exportRequest = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>): HttpRequest<unknown> => { 10 - return (options?.client ?? client).requestOptions({ 11 - responseStyle: 'data', 12 - method: 'GET', 13 - url: '/api/v{api-version}/no+tag', 14 - ...options 15 - }); 16 - }; 9 + export const exportRequest = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 10 + responseStyle: "data", 11 + method: "GET", 12 + url: "/api/v{api-version}/no+tag", 13 + ...options 14 + }); 17 15 18 - export const patchApiVbyApiVersionNoTagRequest = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> => { 19 - return (options?.client ?? client).requestOptions({ 20 - responseStyle: 'data', 21 - method: 'PATCH', 22 - url: '/api/v{api-version}/no+tag', 23 - ...options 24 - }); 25 - }; 16 + export const patchApiVbyApiVersionNoTagRequest = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 17 + responseStyle: "data", 18 + method: "PATCH", 19 + url: "/api/v{api-version}/no+tag", 20 + ...options 21 + }); 26 22 27 - export const importRequest = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>): HttpRequest<unknown> => { 28 - return (options?.client ?? client).requestOptions({ 29 - responseStyle: 'data', 30 - method: 'POST', 31 - url: '/api/v{api-version}/no+tag', 32 - ...options 33 - }); 34 - }; 23 + export const importRequest = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 24 + responseStyle: "data", 25 + method: "POST", 26 + url: "/api/v{api-version}/no+tag", 27 + ...options 28 + }); 35 29 36 - export const fooWowRequest = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> => { 37 - return (options?.client ?? client).requestOptions({ 38 - responseStyle: 'data', 39 - method: 'PUT', 40 - url: '/api/v{api-version}/no+tag', 41 - ...options 42 - }); 43 - }; 30 + export const fooWowRequest = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 31 + responseStyle: "data", 32 + method: "PUT", 33 + url: "/api/v{api-version}/no+tag", 34 + ...options 35 + }); 44 36 45 - export const apiVVersionODataControllerCountRequest = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>): HttpRequest<unknown> => { 46 - return (options?.client ?? client).requestOptions({ 47 - responseStyle: 'data', 48 - method: 'GET', 49 - url: '/api/v{api-version}/simple/$count', 50 - ...options 51 - }); 52 - }; 37 + export const apiVVersionODataControllerCountRequest = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 38 + responseStyle: "data", 39 + method: "GET", 40 + url: "/api/v{api-version}/simple/$count", 41 + ...options 42 + }); 53 43 54 - export const getApiVbyApiVersionSimpleOperationRequest = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>): HttpRequest<unknown> => { 55 - return (options?.client ?? client).requestOptions({ 56 - responseStyle: 'data', 57 - method: 'GET', 58 - url: '/api/v{api-version}/simple:operation', 59 - ...options 60 - }); 61 - }; 44 + export const getApiVbyApiVersionSimpleOperationRequest = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 45 + responseStyle: "data", 46 + method: "GET", 47 + url: "/api/v{api-version}/simple:operation", 48 + ...options 49 + }); 62 50 63 - export const deleteCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 64 - return (options?.client ?? client).requestOptions({ 65 - responseStyle: 'data', 66 - method: 'DELETE', 67 - url: '/api/v{api-version}/simple', 68 - ...options 69 - }); 70 - }; 51 + export const deleteCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 52 + responseStyle: "data", 53 + method: "DELETE", 54 + url: "/api/v{api-version}/simple", 55 + ...options 56 + }); 71 57 72 - export const getCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 73 - return (options?.client ?? client).requestOptions({ 74 - responseStyle: 'data', 75 - method: 'GET', 76 - url: '/api/v{api-version}/simple', 77 - ...options 78 - }); 79 - }; 58 + export const getCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 59 + responseStyle: "data", 60 + method: "GET", 61 + url: "/api/v{api-version}/simple", 62 + ...options 63 + }); 80 64 81 - export const headCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 82 - return (options?.client ?? client).requestOptions({ 83 - responseStyle: 'data', 84 - method: 'HEAD', 85 - url: '/api/v{api-version}/simple', 86 - ...options 87 - }); 88 - }; 65 + export const headCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 66 + responseStyle: "data", 67 + method: "HEAD", 68 + url: "/api/v{api-version}/simple", 69 + ...options 70 + }); 89 71 90 - export const optionsCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 91 - return (options?.client ?? client).requestOptions({ 92 - responseStyle: 'data', 93 - method: 'OPTIONS', 94 - url: '/api/v{api-version}/simple', 95 - ...options 96 - }); 97 - }; 72 + export const optionsCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 73 + responseStyle: "data", 74 + method: "OPTIONS", 75 + url: "/api/v{api-version}/simple", 76 + ...options 77 + }); 98 78 99 - export const patchCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 100 - return (options?.client ?? client).requestOptions({ 101 - responseStyle: 'data', 102 - method: 'PATCH', 103 - url: '/api/v{api-version}/simple', 104 - ...options 105 - }); 106 - }; 79 + export const patchCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 80 + responseStyle: "data", 81 + method: "PATCH", 82 + url: "/api/v{api-version}/simple", 83 + ...options 84 + }); 107 85 108 - export const postCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 109 - return (options?.client ?? client).requestOptions({ 110 - responseStyle: 'data', 111 - method: 'POST', 112 - url: '/api/v{api-version}/simple', 113 - ...options 114 - }); 115 - }; 86 + export const postCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 87 + responseStyle: "data", 88 + method: "POST", 89 + url: "/api/v{api-version}/simple", 90 + ...options 91 + }); 116 92 117 - export const putCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 118 - return (options?.client ?? client).requestOptions({ 119 - responseStyle: 'data', 120 - method: 'PUT', 121 - url: '/api/v{api-version}/simple', 122 - ...options 123 - }); 124 - }; 93 + export const putCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 94 + responseStyle: "data", 95 + method: "PUT", 96 + url: "/api/v{api-version}/simple", 97 + ...options 98 + }); 125 99 126 - export const deleteFooRequest = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>): HttpRequest<unknown> => { 127 - return (options?.client ?? client).requestOptions({ 128 - responseStyle: 'data', 129 - method: 'DELETE', 130 - url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', 131 - ...options 132 - }); 133 - }; 100 + export const deleteFooRequest = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 101 + responseStyle: "data", 102 + method: "DELETE", 103 + url: "/api/v{api-version}/foo/{foo_param}/bar/{BarParam}", 104 + ...options 105 + }); 134 106 135 - export const callWithDescriptionsRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> => { 136 - return (options?.client ?? client).requestOptions({ 137 - responseStyle: 'data', 138 - method: 'POST', 139 - url: '/api/v{api-version}/descriptions', 140 - ...options 141 - }); 142 - }; 107 + export const callWithDescriptionsRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 108 + responseStyle: "data", 109 + method: "POST", 110 + url: "/api/v{api-version}/descriptions", 111 + ...options 112 + }); 143 113 144 114 /** 145 115 * @deprecated 146 116 */ 147 - export const deprecatedCallRequest = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>): HttpRequest<unknown> => { 148 - return (options?.client ?? client).requestOptions({ 149 - responseStyle: 'data', 150 - method: 'POST', 151 - url: '/api/v{api-version}/parameters/deprecated', 152 - ...options 153 - }); 154 - }; 117 + export const deprecatedCallRequest = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 118 + responseStyle: "data", 119 + method: "POST", 120 + url: "/api/v{api-version}/parameters/deprecated", 121 + ...options 122 + }); 155 123 156 - export const callWithParametersRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> => { 157 - return (options?.client ?? client).requestOptions({ 158 - responseStyle: 'data', 159 - method: 'POST', 160 - url: '/api/v{api-version}/parameters/{parameterPath}', 161 - ...options 162 - }); 163 - }; 124 + export const callWithParametersRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 125 + responseStyle: "data", 126 + method: "POST", 127 + url: "/api/v{api-version}/parameters/{parameterPath}", 128 + ...options 129 + }); 164 130 165 - export const callWithWeirdParameterNamesRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> => { 166 - return (options?.client ?? client).requestOptions({ 167 - responseStyle: 'data', 168 - method: 'POST', 169 - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 170 - ...options 171 - }); 172 - }; 131 + export const callWithWeirdParameterNamesRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 132 + responseStyle: "data", 133 + method: "POST", 134 + url: "/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}", 135 + ...options 136 + }); 173 137 174 - export const getCallWithOptionalParamRequest = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> => { 175 - return (options?.client ?? client).requestOptions({ 176 - responseStyle: 'data', 177 - method: 'GET', 178 - url: '/api/v{api-version}/parameters', 179 - ...options 180 - }); 181 - }; 138 + export const getCallWithOptionalParamRequest = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 139 + responseStyle: "data", 140 + method: "GET", 141 + url: "/api/v{api-version}/parameters", 142 + ...options 143 + }); 182 144 183 - export const postCallWithOptionalParamRequest = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> => { 184 - return (options?.client ?? client).requestOptions({ 185 - responseStyle: 'data', 186 - method: 'POST', 187 - url: '/api/v{api-version}/parameters', 188 - ...options 189 - }); 190 - }; 145 + export const postCallWithOptionalParamRequest = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 146 + responseStyle: "data", 147 + method: "POST", 148 + url: "/api/v{api-version}/parameters", 149 + ...options 150 + }); 191 151 192 - export const postApiVbyApiVersionRequestBodyRequest = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>): HttpRequest<unknown> => { 193 - return (options?.client ?? client).requestOptions({ 194 - responseStyle: 'data', 195 - method: 'POST', 196 - url: '/api/v{api-version}/requestBody', 197 - ...options 198 - }); 199 - }; 152 + export const postApiVbyApiVersionRequestBodyRequest = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 153 + responseStyle: "data", 154 + method: "POST", 155 + url: "/api/v{api-version}/requestBody", 156 + ...options 157 + }); 200 158 201 - export const postApiVbyApiVersionFormDataRequest = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>): HttpRequest<unknown> => { 202 - return (options?.client ?? client).requestOptions({ 203 - responseStyle: 'data', 204 - method: 'POST', 205 - url: '/api/v{api-version}/formData', 206 - ...options 207 - }); 208 - }; 159 + export const postApiVbyApiVersionFormDataRequest = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 160 + responseStyle: "data", 161 + method: "POST", 162 + url: "/api/v{api-version}/formData", 163 + ...options 164 + }); 209 165 210 - export const callWithDefaultParametersRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> => { 211 - return (options?.client ?? client).requestOptions({ 212 - responseStyle: 'data', 213 - method: 'GET', 214 - url: '/api/v{api-version}/defaults', 215 - ...options 216 - }); 217 - }; 166 + export const callWithDefaultParametersRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 167 + responseStyle: "data", 168 + method: "GET", 169 + url: "/api/v{api-version}/defaults", 170 + ...options 171 + }); 218 172 219 - export const callWithDefaultOptionalParametersRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> => { 220 - return (options?.client ?? client).requestOptions({ 221 - responseStyle: 'data', 222 - method: 'POST', 223 - url: '/api/v{api-version}/defaults', 224 - ...options 225 - }); 226 - }; 173 + export const callWithDefaultOptionalParametersRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 174 + responseStyle: "data", 175 + method: "POST", 176 + url: "/api/v{api-version}/defaults", 177 + ...options 178 + }); 227 179 228 - export const callToTestOrderOfParamsRequest = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> => { 229 - return (options?.client ?? client).requestOptions({ 230 - responseStyle: 'data', 231 - method: 'PUT', 232 - url: '/api/v{api-version}/defaults', 233 - ...options 234 - }); 235 - }; 180 + export const callToTestOrderOfParamsRequest = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 181 + responseStyle: "data", 182 + method: "PUT", 183 + url: "/api/v{api-version}/defaults", 184 + ...options 185 + }); 236 186 237 - export const duplicateNameRequest = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> => { 238 - return (options?.client ?? client).requestOptions({ 239 - responseStyle: 'data', 240 - method: 'DELETE', 241 - url: '/api/v{api-version}/duplicate', 242 - ...options 243 - }); 244 - }; 187 + export const duplicateNameRequest = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 188 + responseStyle: "data", 189 + method: "DELETE", 190 + url: "/api/v{api-version}/duplicate", 191 + ...options 192 + }); 245 193 246 - export const duplicateName2Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> => { 247 - return (options?.client ?? client).requestOptions({ 248 - responseStyle: 'data', 249 - method: 'GET', 250 - url: '/api/v{api-version}/duplicate', 251 - ...options 252 - }); 253 - }; 194 + export const duplicateName2Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 195 + responseStyle: "data", 196 + method: "GET", 197 + url: "/api/v{api-version}/duplicate", 198 + ...options 199 + }); 254 200 255 - export const duplicateName3Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> => { 256 - return (options?.client ?? client).requestOptions({ 257 - responseStyle: 'data', 258 - method: 'POST', 259 - url: '/api/v{api-version}/duplicate', 260 - ...options 261 - }); 262 - }; 201 + export const duplicateName3Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 202 + responseStyle: "data", 203 + method: "POST", 204 + url: "/api/v{api-version}/duplicate", 205 + ...options 206 + }); 263 207 264 - export const duplicateName4Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> => { 265 - return (options?.client ?? client).requestOptions({ 266 - responseStyle: 'data', 267 - method: 'PUT', 268 - url: '/api/v{api-version}/duplicate', 269 - ...options 270 - }); 271 - }; 208 + export const duplicateName4Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 209 + responseStyle: "data", 210 + method: "PUT", 211 + url: "/api/v{api-version}/duplicate", 212 + ...options 213 + }); 272 214 273 - export const callWithNoContentResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> => { 274 - return (options?.client ?? client).requestOptions({ 275 - responseStyle: 'data', 276 - method: 'GET', 277 - url: '/api/v{api-version}/no-content', 278 - ...options 279 - }); 280 - }; 215 + export const callWithNoContentResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 216 + responseStyle: "data", 217 + method: "GET", 218 + url: "/api/v{api-version}/no-content", 219 + ...options 220 + }); 281 221 282 - export const callWithResponseAndNoContentResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> => { 283 - return (options?.client ?? client).requestOptions({ 284 - responseStyle: 'data', 285 - method: 'GET', 286 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 287 - ...options 288 - }); 289 - }; 222 + export const callWithResponseAndNoContentResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 223 + responseStyle: "data", 224 + method: "GET", 225 + url: "/api/v{api-version}/multiple-tags/response-and-no-content", 226 + ...options 227 + }); 290 228 291 - export const dummyARequest = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> => { 292 - return (options?.client ?? client).requestOptions({ 293 - responseStyle: 'data', 294 - method: 'GET', 295 - url: '/api/v{api-version}/multiple-tags/a', 296 - ...options 297 - }); 298 - }; 229 + export const dummyARequest = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 230 + responseStyle: "data", 231 + method: "GET", 232 + url: "/api/v{api-version}/multiple-tags/a", 233 + ...options 234 + }); 299 235 300 - export const dummyBRequest = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> => { 301 - return (options?.client ?? client).requestOptions({ 302 - responseStyle: 'data', 303 - method: 'GET', 304 - url: '/api/v{api-version}/multiple-tags/b', 305 - ...options 306 - }); 307 - }; 236 + export const dummyBRequest = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 237 + responseStyle: "data", 238 + method: "GET", 239 + url: "/api/v{api-version}/multiple-tags/b", 240 + ...options 241 + }); 308 242 309 - export const callWithResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<unknown> => { 310 - return (options?.client ?? client).requestOptions({ 311 - responseStyle: 'data', 312 - method: 'GET', 313 - url: '/api/v{api-version}/response', 314 - ...options 315 - }); 316 - }; 243 + export const callWithResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 244 + responseStyle: "data", 245 + method: "GET", 246 + url: "/api/v{api-version}/response", 247 + ...options 248 + }); 317 249 318 - export const callWithDuplicateResponsesRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<unknown> => { 319 - return (options?.client ?? client).requestOptions({ 320 - responseStyle: 'data', 321 - method: 'POST', 322 - url: '/api/v{api-version}/response', 323 - ...options 324 - }); 325 - }; 250 + export const callWithDuplicateResponsesRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 251 + responseStyle: "data", 252 + method: "POST", 253 + url: "/api/v{api-version}/response", 254 + ...options 255 + }); 326 256 327 - export const callWithResponsesRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<unknown> => { 328 - return (options?.client ?? client).requestOptions({ 329 - responseStyle: 'data', 330 - method: 'PUT', 331 - url: '/api/v{api-version}/response', 332 - ...options 333 - }); 334 - }; 257 + export const callWithResponsesRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 258 + responseStyle: "data", 259 + method: "PUT", 260 + url: "/api/v{api-version}/response", 261 + ...options 262 + }); 335 263 336 - export const collectionFormatRequest = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> => { 337 - return (options?.client ?? client).requestOptions({ 338 - responseStyle: 'data', 339 - method: 'GET', 340 - url: '/api/v{api-version}/collectionFormat', 341 - ...options 342 - }); 343 - }; 264 + export const collectionFormatRequest = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 265 + responseStyle: "data", 266 + method: "GET", 267 + url: "/api/v{api-version}/collectionFormat", 268 + ...options 269 + }); 344 270 345 - export const typesRequest = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<unknown> => { 346 - return (options?.client ?? client).requestOptions({ 347 - responseStyle: 'data', 348 - method: 'GET', 349 - url: '/api/v{api-version}/types', 350 - ...options 351 - }); 352 - }; 271 + export const typesRequest = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 272 + responseStyle: "data", 273 + method: "GET", 274 + url: "/api/v{api-version}/types", 275 + ...options 276 + }); 353 277 354 - export const uploadFileRequest = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): HttpRequest<unknown> => { 355 - return (options?.client ?? client).requestOptions({ 356 - responseStyle: 'data', 357 - method: 'POST', 358 - url: '/api/v{api-version}/upload', 359 - ...options 360 - }); 361 - }; 278 + export const uploadFileRequest = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 279 + responseStyle: "data", 280 + method: "POST", 281 + url: "/api/v{api-version}/upload", 282 + ...options 283 + }); 362 284 363 - export const fileResponseRequest = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>): HttpRequest<unknown> => { 364 - return (options?.client ?? client).requestOptions({ 365 - responseStyle: 'data', 366 - method: 'GET', 367 - url: '/api/v{api-version}/file/{id}', 368 - ...options 369 - }); 370 - }; 285 + export const fileResponseRequest = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 286 + responseStyle: "data", 287 + method: "GET", 288 + url: "/api/v{api-version}/file/{id}", 289 + ...options 290 + }); 371 291 372 - export const complexTypesRequest = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<unknown> => { 373 - return (options?.client ?? client).requestOptions({ 374 - responseStyle: 'data', 375 - method: 'GET', 376 - url: '/api/v{api-version}/complex', 377 - ...options 378 - }); 379 - }; 292 + export const complexTypesRequest = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 293 + responseStyle: "data", 294 + method: "GET", 295 + url: "/api/v{api-version}/complex", 296 + ...options 297 + }); 380 298 381 - export const multipartResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>): HttpRequest<unknown> => { 382 - return (options?.client ?? client).requestOptions({ 383 - responseStyle: 'data', 384 - method: 'GET', 385 - url: '/api/v{api-version}/multipart', 386 - ...options 387 - }); 388 - }; 299 + export const multipartResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 300 + responseStyle: "data", 301 + method: "GET", 302 + url: "/api/v{api-version}/multipart", 303 + ...options 304 + }); 389 305 390 - export const multipartRequestRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>): HttpRequest<unknown> => { 391 - return (options?.client ?? client).requestOptions({ 392 - responseStyle: 'data', 393 - method: 'POST', 394 - url: '/api/v{api-version}/multipart', 395 - ...options 396 - }); 397 - }; 306 + export const multipartRequestRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 307 + responseStyle: "data", 308 + method: "POST", 309 + url: "/api/v{api-version}/multipart", 310 + ...options 311 + }); 398 312 399 - export const complexParamsRequest = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>): HttpRequest<unknown> => { 400 - return (options?.client ?? client).requestOptions({ 401 - responseStyle: 'data', 402 - method: 'PUT', 403 - url: '/api/v{api-version}/complex/{id}', 404 - ...options 405 - }); 406 - }; 313 + export const complexParamsRequest = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 314 + responseStyle: "data", 315 + method: "PUT", 316 + url: "/api/v{api-version}/complex/{id}", 317 + ...options 318 + }); 407 319 408 - export const callWithResultFromHeaderRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> => { 409 - return (options?.client ?? client).requestOptions({ 410 - responseStyle: 'data', 411 - method: 'POST', 412 - url: '/api/v{api-version}/header', 413 - ...options 414 - }); 415 - }; 320 + export const callWithResultFromHeaderRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 321 + responseStyle: "data", 322 + method: "POST", 323 + url: "/api/v{api-version}/header", 324 + ...options 325 + }); 416 326 417 - export const testErrorCodeRequest = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> => { 418 - return (options?.client ?? client).requestOptions({ 419 - responseStyle: 'data', 420 - method: 'POST', 421 - url: '/api/v{api-version}/error', 422 - ...options 423 - }); 424 - }; 327 + export const testErrorCodeRequest = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 328 + responseStyle: "data", 329 + method: "POST", 330 + url: "/api/v{api-version}/error", 331 + ...options 332 + }); 425 333 426 - export const nonAsciiæøåÆøÅöôêÊ字符串Request = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<unknown> => { 427 - return (options?.client ?? client).requestOptions({ 428 - responseStyle: 'data', 429 - method: 'POST', 430 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 431 - ...options 432 - }); 433 - }; 334 + export const nonAsciiæøåÆøÅöôêÊ字符串Request = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 335 + responseStyle: "data", 336 + method: "POST", 337 + url: "/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串", 338 + ...options 339 + }); 434 340 435 341 /** 436 342 * Login User 437 343 */ 438 - export const putWithFormUrlEncodedRequest = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>): HttpRequest<unknown> => { 439 - return (options?.client ?? client).requestOptions({ 440 - responseStyle: 'data', 441 - method: 'PUT', 442 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 443 - ...options 444 - }); 445 - }; 344 + export const putWithFormUrlEncodedRequest = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 345 + responseStyle: "data", 346 + method: "PUT", 347 + url: "/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串", 348 + ...options 349 + }); 446 350 447 - export const exportResource = <ThrowOnError extends boolean = false>(options?: () => Options<ExportData, ThrowOnError> | undefined) => { 448 - return httpResource<unknown>(() => { 449 - const opts = options ? options() : undefined; 450 - return opts ? exportRequest(opts) : undefined; 451 - }); 452 - }; 351 + export const exportResource = <ThrowOnError extends boolean = false>(options?: () => Options<ExportData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 352 + const opts = options ? options() : undefined; 353 + return opts ? exportRequest(opts) : undefined; 354 + }); 453 355 454 - export const patchApiVbyApiVersionNoTagResource = <ThrowOnError extends boolean = false>(options?: () => Options<PatchApiVbyApiVersionNoTagData, ThrowOnError> | undefined) => { 455 - return httpResource<unknown>(() => { 456 - const opts = options ? options() : undefined; 457 - return opts ? patchApiVbyApiVersionNoTagRequest(opts) : undefined; 458 - }); 459 - }; 356 + export const patchApiVbyApiVersionNoTagResource = <ThrowOnError extends boolean = false>(options?: () => Options<PatchApiVbyApiVersionNoTagData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 357 + const opts = options ? options() : undefined; 358 + return opts ? patchApiVbyApiVersionNoTagRequest(opts) : undefined; 359 + }); 460 360 461 - export const importResource = <ThrowOnError extends boolean = false>(options: () => Options<ImportData, ThrowOnError> | undefined) => { 462 - return httpResource<ImportResponse>(() => { 463 - const opts = options ? options() : undefined; 464 - return opts ? importRequest(opts) : undefined; 465 - }); 466 - }; 361 + export const importResource = <ThrowOnError extends boolean = false>(options: () => Options<ImportData, ThrowOnError> | undefined) => httpResource<ImportResponse>(() => { 362 + const opts = options ? options() : undefined; 363 + return opts ? importRequest(opts) : undefined; 364 + }); 467 365 468 - export const fooWowResource = <ThrowOnError extends boolean = false>(options?: () => Options<FooWowData, ThrowOnError> | undefined) => { 469 - return httpResource<unknown>(() => { 470 - const opts = options ? options() : undefined; 471 - return opts ? fooWowRequest(opts) : undefined; 472 - }); 473 - }; 366 + export const fooWowResource = <ThrowOnError extends boolean = false>(options?: () => Options<FooWowData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 367 + const opts = options ? options() : undefined; 368 + return opts ? fooWowRequest(opts) : undefined; 369 + }); 474 370 475 - export const apiVVersionODataControllerCountResource = <ThrowOnError extends boolean = false>(options?: () => Options<ApiVVersionODataControllerCountData, ThrowOnError> | undefined) => { 476 - return httpResource<ApiVVersionODataControllerCountResponse>(() => { 477 - const opts = options ? options() : undefined; 478 - return opts ? apiVVersionODataControllerCountRequest(opts) : undefined; 479 - }); 480 - }; 371 + export const apiVVersionODataControllerCountResource = <ThrowOnError extends boolean = false>(options?: () => Options<ApiVVersionODataControllerCountData, ThrowOnError> | undefined) => httpResource<ApiVVersionODataControllerCountResponse>(() => { 372 + const opts = options ? options() : undefined; 373 + return opts ? apiVVersionODataControllerCountRequest(opts) : undefined; 374 + }); 481 375 482 - export const getApiVbyApiVersionSimpleOperationResource = <ThrowOnError extends boolean = false>(options: () => Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError> | undefined) => { 483 - return httpResource<GetApiVbyApiVersionSimpleOperationResponse>(() => { 484 - const opts = options ? options() : undefined; 485 - return opts ? getApiVbyApiVersionSimpleOperationRequest(opts) : undefined; 486 - }); 487 - }; 376 + export const getApiVbyApiVersionSimpleOperationResource = <ThrowOnError extends boolean = false>(options: () => Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError> | undefined) => httpResource<GetApiVbyApiVersionSimpleOperationResponse>(() => { 377 + const opts = options ? options() : undefined; 378 + return opts ? getApiVbyApiVersionSimpleOperationRequest(opts) : undefined; 379 + }); 488 380 489 - export const deleteCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 490 - return httpResource<unknown>(() => { 491 - const opts = options ? options() : undefined; 492 - return opts ? deleteCallWithoutParametersAndResponseRequest(opts) : undefined; 493 - }); 494 - }; 381 + export const deleteCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 382 + const opts = options ? options() : undefined; 383 + return opts ? deleteCallWithoutParametersAndResponseRequest(opts) : undefined; 384 + }); 495 385 496 - export const getCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<GetCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 497 - return httpResource<unknown>(() => { 498 - const opts = options ? options() : undefined; 499 - return opts ? getCallWithoutParametersAndResponseRequest(opts) : undefined; 500 - }); 501 - }; 386 + export const getCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<GetCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 387 + const opts = options ? options() : undefined; 388 + return opts ? getCallWithoutParametersAndResponseRequest(opts) : undefined; 389 + }); 502 390 503 - export const headCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<HeadCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 504 - return httpResource<unknown>(() => { 505 - const opts = options ? options() : undefined; 506 - return opts ? headCallWithoutParametersAndResponseRequest(opts) : undefined; 507 - }); 508 - }; 391 + export const headCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<HeadCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 392 + const opts = options ? options() : undefined; 393 + return opts ? headCallWithoutParametersAndResponseRequest(opts) : undefined; 394 + }); 509 395 510 - export const optionsCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 511 - return httpResource<unknown>(() => { 512 - const opts = options ? options() : undefined; 513 - return opts ? optionsCallWithoutParametersAndResponseRequest(opts) : undefined; 514 - }); 515 - }; 396 + export const optionsCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 397 + const opts = options ? options() : undefined; 398 + return opts ? optionsCallWithoutParametersAndResponseRequest(opts) : undefined; 399 + }); 516 400 517 - export const patchCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PatchCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 518 - return httpResource<unknown>(() => { 519 - const opts = options ? options() : undefined; 520 - return opts ? patchCallWithoutParametersAndResponseRequest(opts) : undefined; 521 - }); 522 - }; 401 + export const patchCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PatchCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 402 + const opts = options ? options() : undefined; 403 + return opts ? patchCallWithoutParametersAndResponseRequest(opts) : undefined; 404 + }); 523 405 524 - export const postCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 525 - return httpResource<unknown>(() => { 526 - const opts = options ? options() : undefined; 527 - return opts ? postCallWithoutParametersAndResponseRequest(opts) : undefined; 528 - }); 529 - }; 406 + export const postCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 407 + const opts = options ? options() : undefined; 408 + return opts ? postCallWithoutParametersAndResponseRequest(opts) : undefined; 409 + }); 530 410 531 - export const putCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PutCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 532 - return httpResource<unknown>(() => { 533 - const opts = options ? options() : undefined; 534 - return opts ? putCallWithoutParametersAndResponseRequest(opts) : undefined; 535 - }); 536 - }; 411 + export const putCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PutCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 412 + const opts = options ? options() : undefined; 413 + return opts ? putCallWithoutParametersAndResponseRequest(opts) : undefined; 414 + }); 537 415 538 - export const deleteFooResource = <ThrowOnError extends boolean = false>(options: () => Options<DeleteFooData3, ThrowOnError> | undefined) => { 539 - return httpResource<unknown>(() => { 540 - const opts = options ? options() : undefined; 541 - return opts ? deleteFooRequest(opts) : undefined; 542 - }); 543 - }; 416 + export const deleteFooResource = <ThrowOnError extends boolean = false>(options: () => Options<DeleteFooData3, ThrowOnError> | undefined) => httpResource<unknown>(() => { 417 + const opts = options ? options() : undefined; 418 + return opts ? deleteFooRequest(opts) : undefined; 419 + }); 544 420 545 - export const callWithDescriptionsResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDescriptionsData, ThrowOnError> | undefined) => { 546 - return httpResource<unknown>(() => { 547 - const opts = options ? options() : undefined; 548 - return opts ? callWithDescriptionsRequest(opts) : undefined; 549 - }); 550 - }; 421 + export const callWithDescriptionsResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDescriptionsData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 422 + const opts = options ? options() : undefined; 423 + return opts ? callWithDescriptionsRequest(opts) : undefined; 424 + }); 551 425 552 426 /** 553 427 * @deprecated 554 428 */ 555 - export const deprecatedCallResource = <ThrowOnError extends boolean = false>(options: () => Options<DeprecatedCallData, ThrowOnError> | undefined) => { 556 - return httpResource<unknown>(() => { 557 - const opts = options ? options() : undefined; 558 - return opts ? deprecatedCallRequest(opts) : undefined; 559 - }); 560 - }; 429 + export const deprecatedCallResource = <ThrowOnError extends boolean = false>(options: () => Options<DeprecatedCallData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 430 + const opts = options ? options() : undefined; 431 + return opts ? deprecatedCallRequest(opts) : undefined; 432 + }); 561 433 562 - export const callWithParametersResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithParametersData, ThrowOnError> | undefined) => { 563 - return httpResource<unknown>(() => { 564 - const opts = options ? options() : undefined; 565 - return opts ? callWithParametersRequest(opts) : undefined; 566 - }); 567 - }; 434 + export const callWithParametersResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithParametersData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 435 + const opts = options ? options() : undefined; 436 + return opts ? callWithParametersRequest(opts) : undefined; 437 + }); 568 438 569 - export const callWithWeirdParameterNamesResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithWeirdParameterNamesData, ThrowOnError> | undefined) => { 570 - return httpResource<unknown>(() => { 571 - const opts = options ? options() : undefined; 572 - return opts ? callWithWeirdParameterNamesRequest(opts) : undefined; 573 - }); 574 - }; 439 + export const callWithWeirdParameterNamesResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithWeirdParameterNamesData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 440 + const opts = options ? options() : undefined; 441 + return opts ? callWithWeirdParameterNamesRequest(opts) : undefined; 442 + }); 575 443 576 - export const getCallWithOptionalParamResource = <ThrowOnError extends boolean = false>(options: () => Options<GetCallWithOptionalParamData, ThrowOnError> | undefined) => { 577 - return httpResource<unknown>(() => { 578 - const opts = options ? options() : undefined; 579 - return opts ? getCallWithOptionalParamRequest(opts) : undefined; 580 - }); 581 - }; 444 + export const getCallWithOptionalParamResource = <ThrowOnError extends boolean = false>(options: () => Options<GetCallWithOptionalParamData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 445 + const opts = options ? options() : undefined; 446 + return opts ? getCallWithOptionalParamRequest(opts) : undefined; 447 + }); 582 448 583 - export const postCallWithOptionalParamResource = <ThrowOnError extends boolean = false>(options: () => Options<PostCallWithOptionalParamData, ThrowOnError> | undefined) => { 584 - return httpResource<PostCallWithOptionalParamResponse>(() => { 585 - const opts = options ? options() : undefined; 586 - return opts ? postCallWithOptionalParamRequest(opts) : undefined; 587 - }); 588 - }; 449 + export const postCallWithOptionalParamResource = <ThrowOnError extends boolean = false>(options: () => Options<PostCallWithOptionalParamData, ThrowOnError> | undefined) => httpResource<PostCallWithOptionalParamResponse>(() => { 450 + const opts = options ? options() : undefined; 451 + return opts ? postCallWithOptionalParamRequest(opts) : undefined; 452 + }); 589 453 590 - export const postApiVbyApiVersionRequestBodyResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError> | undefined) => { 591 - return httpResource<unknown>(() => { 592 - const opts = options ? options() : undefined; 593 - return opts ? postApiVbyApiVersionRequestBodyRequest(opts) : undefined; 594 - }); 595 - }; 454 + export const postApiVbyApiVersionRequestBodyResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 455 + const opts = options ? options() : undefined; 456 + return opts ? postApiVbyApiVersionRequestBodyRequest(opts) : undefined; 457 + }); 596 458 597 - export const postApiVbyApiVersionFormDataResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionFormDataData, ThrowOnError> | undefined) => { 598 - return httpResource<unknown>(() => { 599 - const opts = options ? options() : undefined; 600 - return opts ? postApiVbyApiVersionFormDataRequest(opts) : undefined; 601 - }); 602 - }; 459 + export const postApiVbyApiVersionFormDataResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionFormDataData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 460 + const opts = options ? options() : undefined; 461 + return opts ? postApiVbyApiVersionFormDataRequest(opts) : undefined; 462 + }); 603 463 604 - export const callWithDefaultParametersResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultParametersData, ThrowOnError> | undefined) => { 605 - return httpResource<unknown>(() => { 606 - const opts = options ? options() : undefined; 607 - return opts ? callWithDefaultParametersRequest(opts) : undefined; 608 - }); 609 - }; 464 + export const callWithDefaultParametersResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultParametersData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 465 + const opts = options ? options() : undefined; 466 + return opts ? callWithDefaultParametersRequest(opts) : undefined; 467 + }); 610 468 611 - export const callWithDefaultOptionalParametersResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultOptionalParametersData, ThrowOnError> | undefined) => { 612 - return httpResource<unknown>(() => { 613 - const opts = options ? options() : undefined; 614 - return opts ? callWithDefaultOptionalParametersRequest(opts) : undefined; 615 - }); 616 - }; 469 + export const callWithDefaultOptionalParametersResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultOptionalParametersData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 470 + const opts = options ? options() : undefined; 471 + return opts ? callWithDefaultOptionalParametersRequest(opts) : undefined; 472 + }); 617 473 618 - export const callToTestOrderOfParamsResource = <ThrowOnError extends boolean = false>(options: () => Options<CallToTestOrderOfParamsData, ThrowOnError> | undefined) => { 619 - return httpResource<unknown>(() => { 620 - const opts = options ? options() : undefined; 621 - return opts ? callToTestOrderOfParamsRequest(opts) : undefined; 622 - }); 623 - }; 474 + export const callToTestOrderOfParamsResource = <ThrowOnError extends boolean = false>(options: () => Options<CallToTestOrderOfParamsData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 475 + const opts = options ? options() : undefined; 476 + return opts ? callToTestOrderOfParamsRequest(opts) : undefined; 477 + }); 624 478 625 - export const duplicateNameResource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) => { 626 - return httpResource<unknown>(() => { 627 - const opts = options ? options() : undefined; 628 - return opts ? duplicateNameRequest(opts) : undefined; 629 - }); 630 - }; 479 + export const duplicateNameResource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 480 + const opts = options ? options() : undefined; 481 + return opts ? duplicateNameRequest(opts) : undefined; 482 + }); 631 483 632 - export const duplicateName2Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName2Data, ThrowOnError> | undefined) => { 633 - return httpResource<unknown>(() => { 634 - const opts = options ? options() : undefined; 635 - return opts ? duplicateName2Request(opts) : undefined; 636 - }); 637 - }; 484 + export const duplicateName2Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName2Data, ThrowOnError> | undefined) => httpResource<unknown>(() => { 485 + const opts = options ? options() : undefined; 486 + return opts ? duplicateName2Request(opts) : undefined; 487 + }); 638 488 639 - export const duplicateName3Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName3Data, ThrowOnError> | undefined) => { 640 - return httpResource<unknown>(() => { 641 - const opts = options ? options() : undefined; 642 - return opts ? duplicateName3Request(opts) : undefined; 643 - }); 644 - }; 489 + export const duplicateName3Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName3Data, ThrowOnError> | undefined) => httpResource<unknown>(() => { 490 + const opts = options ? options() : undefined; 491 + return opts ? duplicateName3Request(opts) : undefined; 492 + }); 645 493 646 - export const duplicateName4Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName4Data, ThrowOnError> | undefined) => { 647 - return httpResource<unknown>(() => { 648 - const opts = options ? options() : undefined; 649 - return opts ? duplicateName4Request(opts) : undefined; 650 - }); 651 - }; 494 + export const duplicateName4Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName4Data, ThrowOnError> | undefined) => httpResource<unknown>(() => { 495 + const opts = options ? options() : undefined; 496 + return opts ? duplicateName4Request(opts) : undefined; 497 + }); 652 498 653 - export const callWithNoContentResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithNoContentResponseData, ThrowOnError> | undefined) => { 654 - return httpResource<CallWithNoContentResponseResponse>(() => { 655 - const opts = options ? options() : undefined; 656 - return opts ? callWithNoContentResponseRequest(opts) : undefined; 657 - }); 658 - }; 499 + export const callWithNoContentResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithNoContentResponseData, ThrowOnError> | undefined) => httpResource<CallWithNoContentResponseResponse>(() => { 500 + const opts = options ? options() : undefined; 501 + return opts ? callWithNoContentResponseRequest(opts) : undefined; 502 + }); 659 503 660 - export const callWithResponseAndNoContentResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) => { 661 - return httpResource<CallWithResponseAndNoContentResponseResponse>(() => { 662 - const opts = options ? options() : undefined; 663 - return opts ? callWithResponseAndNoContentResponseRequest(opts) : undefined; 664 - }); 665 - }; 504 + export const callWithResponseAndNoContentResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) => httpResource<CallWithResponseAndNoContentResponseResponse>(() => { 505 + const opts = options ? options() : undefined; 506 + return opts ? callWithResponseAndNoContentResponseRequest(opts) : undefined; 507 + }); 666 508 667 - export const dummyAResource = <ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) => { 668 - return httpResource<DummyAResponse>(() => { 669 - const opts = options ? options() : undefined; 670 - return opts ? dummyARequest(opts) : undefined; 671 - }); 672 - }; 509 + export const dummyAResource = <ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) => httpResource<DummyAResponse>(() => { 510 + const opts = options ? options() : undefined; 511 + return opts ? dummyARequest(opts) : undefined; 512 + }); 673 513 674 - export const dummyBResource = <ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) => { 675 - return httpResource<DummyBResponse>(() => { 676 - const opts = options ? options() : undefined; 677 - return opts ? dummyBRequest(opts) : undefined; 678 - }); 679 - }; 514 + export const dummyBResource = <ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) => httpResource<DummyBResponse>(() => { 515 + const opts = options ? options() : undefined; 516 + return opts ? dummyBRequest(opts) : undefined; 517 + }); 680 518 681 - export const callWithResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseData, ThrowOnError> | undefined) => { 682 - return httpResource<CallWithResponseResponse>(() => { 683 - const opts = options ? options() : undefined; 684 - return opts ? callWithResponseRequest(opts) : undefined; 685 - }); 686 - }; 519 + export const callWithResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseData, ThrowOnError> | undefined) => httpResource<CallWithResponseResponse>(() => { 520 + const opts = options ? options() : undefined; 521 + return opts ? callWithResponseRequest(opts) : undefined; 522 + }); 687 523 688 - export const callWithDuplicateResponsesResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDuplicateResponsesData, ThrowOnError> | undefined) => { 689 - return httpResource<CallWithDuplicateResponsesResponse>(() => { 690 - const opts = options ? options() : undefined; 691 - return opts ? callWithDuplicateResponsesRequest(opts) : undefined; 692 - }); 693 - }; 524 + export const callWithDuplicateResponsesResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDuplicateResponsesData, ThrowOnError> | undefined) => httpResource<CallWithDuplicateResponsesResponse>(() => { 525 + const opts = options ? options() : undefined; 526 + return opts ? callWithDuplicateResponsesRequest(opts) : undefined; 527 + }); 694 528 695 - export const callWithResponsesResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponsesData, ThrowOnError> | undefined) => { 696 - return httpResource<CallWithResponsesResponse>(() => { 697 - const opts = options ? options() : undefined; 698 - return opts ? callWithResponsesRequest(opts) : undefined; 699 - }); 700 - }; 529 + export const callWithResponsesResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponsesData, ThrowOnError> | undefined) => httpResource<CallWithResponsesResponse>(() => { 530 + const opts = options ? options() : undefined; 531 + return opts ? callWithResponsesRequest(opts) : undefined; 532 + }); 701 533 702 - export const collectionFormatResource = <ThrowOnError extends boolean = false>(options: () => Options<CollectionFormatData, ThrowOnError> | undefined) => { 703 - return httpResource<unknown>(() => { 704 - const opts = options ? options() : undefined; 705 - return opts ? collectionFormatRequest(opts) : undefined; 706 - }); 707 - }; 534 + export const collectionFormatResource = <ThrowOnError extends boolean = false>(options: () => Options<CollectionFormatData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 535 + const opts = options ? options() : undefined; 536 + return opts ? collectionFormatRequest(opts) : undefined; 537 + }); 708 538 709 - export const typesResource = <ThrowOnError extends boolean = false>(options: () => Options<TypesData, ThrowOnError> | undefined) => { 710 - return httpResource<TypesResponse>(() => { 711 - const opts = options ? options() : undefined; 712 - return opts ? typesRequest(opts) : undefined; 713 - }); 714 - }; 539 + export const typesResource = <ThrowOnError extends boolean = false>(options: () => Options<TypesData, ThrowOnError> | undefined) => httpResource<TypesResponse>(() => { 540 + const opts = options ? options() : undefined; 541 + return opts ? typesRequest(opts) : undefined; 542 + }); 715 543 716 - export const uploadFileResource = <ThrowOnError extends boolean = false>(options: () => Options<UploadFileData, ThrowOnError> | undefined) => { 717 - return httpResource<UploadFileResponse>(() => { 718 - const opts = options ? options() : undefined; 719 - return opts ? uploadFileRequest(opts) : undefined; 720 - }); 721 - }; 544 + export const uploadFileResource = <ThrowOnError extends boolean = false>(options: () => Options<UploadFileData, ThrowOnError> | undefined) => httpResource<UploadFileResponse>(() => { 545 + const opts = options ? options() : undefined; 546 + return opts ? uploadFileRequest(opts) : undefined; 547 + }); 722 548 723 - export const fileResponseResource = <ThrowOnError extends boolean = false>(options: () => Options<FileResponseData, ThrowOnError> | undefined) => { 724 - return httpResource<FileResponseResponse>(() => { 725 - const opts = options ? options() : undefined; 726 - return opts ? fileResponseRequest(opts) : undefined; 727 - }); 728 - }; 549 + export const fileResponseResource = <ThrowOnError extends boolean = false>(options: () => Options<FileResponseData, ThrowOnError> | undefined) => httpResource<FileResponseResponse>(() => { 550 + const opts = options ? options() : undefined; 551 + return opts ? fileResponseRequest(opts) : undefined; 552 + }); 729 553 730 - export const complexTypesResource = <ThrowOnError extends boolean = false>(options: () => Options<ComplexTypesData, ThrowOnError> | undefined) => { 731 - return httpResource<ComplexTypesResponse>(() => { 732 - const opts = options ? options() : undefined; 733 - return opts ? complexTypesRequest(opts) : undefined; 734 - }); 735 - }; 554 + export const complexTypesResource = <ThrowOnError extends boolean = false>(options: () => Options<ComplexTypesData, ThrowOnError> | undefined) => httpResource<ComplexTypesResponse>(() => { 555 + const opts = options ? options() : undefined; 556 + return opts ? complexTypesRequest(opts) : undefined; 557 + }); 736 558 737 - export const multipartResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<MultipartResponseData, ThrowOnError> | undefined) => { 738 - return httpResource<MultipartResponseResponse>(() => { 739 - const opts = options ? options() : undefined; 740 - return opts ? multipartResponseRequest(opts) : undefined; 741 - }); 742 - }; 559 + export const multipartResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<MultipartResponseData, ThrowOnError> | undefined) => httpResource<MultipartResponseResponse>(() => { 560 + const opts = options ? options() : undefined; 561 + return opts ? multipartResponseRequest(opts) : undefined; 562 + }); 743 563 744 - export const multipartRequestResource = <ThrowOnError extends boolean = false>(options?: () => Options<MultipartRequestData, ThrowOnError> | undefined) => { 745 - return httpResource<unknown>(() => { 746 - const opts = options ? options() : undefined; 747 - return opts ? multipartRequestRequest(opts) : undefined; 748 - }); 749 - }; 564 + export const multipartRequestResource = <ThrowOnError extends boolean = false>(options?: () => Options<MultipartRequestData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 565 + const opts = options ? options() : undefined; 566 + return opts ? multipartRequestRequest(opts) : undefined; 567 + }); 750 568 751 - export const complexParamsResource = <ThrowOnError extends boolean = false>(options: () => Options<ComplexParamsData, ThrowOnError> | undefined) => { 752 - return httpResource<ComplexParamsResponse>(() => { 753 - const opts = options ? options() : undefined; 754 - return opts ? complexParamsRequest(opts) : undefined; 755 - }); 756 - }; 569 + export const complexParamsResource = <ThrowOnError extends boolean = false>(options: () => Options<ComplexParamsData, ThrowOnError> | undefined) => httpResource<ComplexParamsResponse>(() => { 570 + const opts = options ? options() : undefined; 571 + return opts ? complexParamsRequest(opts) : undefined; 572 + }); 757 573 758 - export const callWithResultFromHeaderResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResultFromHeaderData, ThrowOnError> | undefined) => { 759 - return httpResource<unknown>(() => { 760 - const opts = options ? options() : undefined; 761 - return opts ? callWithResultFromHeaderRequest(opts) : undefined; 762 - }); 763 - }; 574 + export const callWithResultFromHeaderResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResultFromHeaderData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 575 + const opts = options ? options() : undefined; 576 + return opts ? callWithResultFromHeaderRequest(opts) : undefined; 577 + }); 764 578 765 - export const testErrorCodeResource = <ThrowOnError extends boolean = false>(options: () => Options<TestErrorCodeData, ThrowOnError> | undefined) => { 766 - return httpResource<unknown>(() => { 767 - const opts = options ? options() : undefined; 768 - return opts ? testErrorCodeRequest(opts) : undefined; 769 - }); 770 - }; 579 + export const testErrorCodeResource = <ThrowOnError extends boolean = false>(options: () => Options<TestErrorCodeData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 580 + const opts = options ? options() : undefined; 581 + return opts ? testErrorCodeRequest(opts) : undefined; 582 + }); 771 583 772 - export const nonAsciiæøåÆøÅöôêÊ字符串Resource = <ThrowOnError extends boolean = false>(options: () => Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError> | undefined) => { 773 - return httpResource<NonAsciiæøåÆøÅöôêÊ字符串Response>(() => { 774 - const opts = options ? options() : undefined; 775 - return opts ? nonAsciiæøåÆøÅöôêÊ字符串Request(opts) : undefined; 776 - }); 777 - }; 584 + export const nonAsciiæøåÆøÅöôêÊ字符串Resource = <ThrowOnError extends boolean = false>(options: () => Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError> | undefined) => httpResource<NonAsciiæøåÆøÅöôêÊ字符串Response>(() => { 585 + const opts = options ? options() : undefined; 586 + return opts ? nonAsciiæøåÆøÅöôêÊ字符串Request(opts) : undefined; 587 + }); 778 588 779 589 /** 780 590 * Login User 781 591 */ 782 - export const putWithFormUrlEncodedResource = <ThrowOnError extends boolean = false>(options: () => Options<PutWithFormUrlEncodedData, ThrowOnError> | undefined) => { 783 - return httpResource<unknown>(() => { 784 - const opts = options ? options() : undefined; 785 - return opts ? putWithFormUrlEncodedRequest(opts) : undefined; 786 - }); 787 - }; 592 + export const putWithFormUrlEncodedResource = <ThrowOnError extends boolean = false>(options: () => Options<PutWithFormUrlEncodedData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 593 + const opts = options ? options() : undefined; 594 + return opts ? putWithFormUrlEncodedRequest(opts) : undefined; 595 + });
+202 -294
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/@angular/common.gen.ts
··· 7 7 import type { Options } from '../sdk.gen'; 8 8 import type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen'; 9 9 10 - @Injectable({ 11 - providedIn: 'root' 12 - }) 10 + @Injectable({ providedIn: "root" }) 13 11 export class DefaultServiceRequests { 14 12 public export<ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>): HttpRequest<unknown> { 15 13 return (options?.client ?? client).requestOptions({ 16 - responseStyle: 'data', 17 - method: 'GET', 18 - url: '/api/v{api-version}/no+tag', 14 + responseStyle: "data", 15 + method: "GET", 16 + url: "/api/v{api-version}/no+tag", 19 17 ...options 20 18 }); 21 19 } 22 20 23 21 public patchApiVbyApiVersionNoTag<ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> { 24 22 return (options?.client ?? client).requestOptions({ 25 - responseStyle: 'data', 26 - method: 'PATCH', 27 - url: '/api/v{api-version}/no+tag', 23 + responseStyle: "data", 24 + method: "PATCH", 25 + url: "/api/v{api-version}/no+tag", 28 26 ...options 29 27 }); 30 28 } 31 29 32 30 public import<ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>): HttpRequest<unknown> { 33 31 return (options?.client ?? client).requestOptions({ 34 - responseStyle: 'data', 35 - method: 'POST', 36 - url: '/api/v{api-version}/no+tag', 32 + responseStyle: "data", 33 + method: "POST", 34 + url: "/api/v{api-version}/no+tag", 37 35 ...options 38 36 }); 39 37 } 40 38 41 39 public fooWow<ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> { 42 40 return (options?.client ?? client).requestOptions({ 43 - responseStyle: 'data', 44 - method: 'PUT', 45 - url: '/api/v{api-version}/no+tag', 41 + responseStyle: "data", 42 + method: "PUT", 43 + url: "/api/v{api-version}/no+tag", 46 44 ...options 47 45 }); 48 46 } 49 47 50 48 public getApiVbyApiVersionSimpleOperation<ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>): HttpRequest<unknown> { 51 49 return (options?.client ?? client).requestOptions({ 52 - responseStyle: 'data', 53 - method: 'GET', 54 - url: '/api/v{api-version}/simple:operation', 50 + responseStyle: "data", 51 + method: "GET", 52 + url: "/api/v{api-version}/simple:operation", 55 53 ...options 56 54 }); 57 55 } ··· 60 58 export class ODataControllerServiceRequests { 61 59 public apiVVersionODataControllerCount<ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>): HttpRequest<unknown> { 62 60 return (options?.client ?? client).requestOptions({ 63 - responseStyle: 'data', 64 - method: 'GET', 65 - url: '/api/v{api-version}/simple/$count', 61 + responseStyle: "data", 62 + method: "GET", 63 + url: "/api/v{api-version}/simple/$count", 66 64 ...options 67 65 }); 68 66 } ··· 76 74 vVersionService = new VVersionServiceRequests(); 77 75 } 78 76 79 - @Injectable({ 80 - providedIn: 'root' 81 - }) 77 + @Injectable({ providedIn: "root" }) 82 78 export class SimpleServiceRequests { 83 79 public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 84 80 return (options?.client ?? client).requestOptions({ 85 - responseStyle: 'data', 86 - method: 'DELETE', 87 - url: '/api/v{api-version}/simple', 81 + responseStyle: "data", 82 + method: "DELETE", 83 + url: "/api/v{api-version}/simple", 88 84 ...options 89 85 }); 90 86 } 91 87 92 88 public getCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 93 89 return (options?.client ?? client).requestOptions({ 94 - responseStyle: 'data', 95 - method: 'GET', 96 - url: '/api/v{api-version}/simple', 90 + responseStyle: "data", 91 + method: "GET", 92 + url: "/api/v{api-version}/simple", 97 93 ...options 98 94 }); 99 95 } 100 96 101 97 public headCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 102 98 return (options?.client ?? client).requestOptions({ 103 - responseStyle: 'data', 104 - method: 'HEAD', 105 - url: '/api/v{api-version}/simple', 99 + responseStyle: "data", 100 + method: "HEAD", 101 + url: "/api/v{api-version}/simple", 106 102 ...options 107 103 }); 108 104 } 109 105 110 106 public optionsCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 111 107 return (options?.client ?? client).requestOptions({ 112 - responseStyle: 'data', 113 - method: 'OPTIONS', 114 - url: '/api/v{api-version}/simple', 108 + responseStyle: "data", 109 + method: "OPTIONS", 110 + url: "/api/v{api-version}/simple", 115 111 ...options 116 112 }); 117 113 } 118 114 119 115 public patchCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 120 116 return (options?.client ?? client).requestOptions({ 121 - responseStyle: 'data', 122 - method: 'PATCH', 123 - url: '/api/v{api-version}/simple', 117 + responseStyle: "data", 118 + method: "PATCH", 119 + url: "/api/v{api-version}/simple", 124 120 ...options 125 121 }); 126 122 } 127 123 128 124 public postCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 129 125 return (options?.client ?? client).requestOptions({ 130 - responseStyle: 'data', 131 - method: 'POST', 132 - url: '/api/v{api-version}/simple', 126 + responseStyle: "data", 127 + method: "POST", 128 + url: "/api/v{api-version}/simple", 133 129 ...options 134 130 }); 135 131 } 136 132 137 133 public putCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> { 138 134 return (options?.client ?? client).requestOptions({ 139 - responseStyle: 'data', 140 - method: 'PUT', 141 - url: '/api/v{api-version}/simple', 135 + responseStyle: "data", 136 + method: "PUT", 137 + url: "/api/v{api-version}/simple", 142 138 ...options 143 139 }); 144 140 } 145 141 apiService = new ApiServiceRequests(); 146 142 } 147 143 148 - @Injectable({ 149 - providedIn: 'root' 150 - }) 144 + @Injectable({ providedIn: "root" }) 151 145 export class ParametersServiceRequests { 152 146 public deleteFoo<ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>): HttpRequest<unknown> { 153 147 return (options?.client ?? client).requestOptions({ 154 - responseStyle: 'data', 155 - method: 'DELETE', 156 - url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', 148 + responseStyle: "data", 149 + method: "DELETE", 150 + url: "/api/v{api-version}/foo/{foo_param}/bar/{BarParam}", 157 151 ...options 158 152 }); 159 153 } 160 154 161 155 public callWithParameters<ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> { 162 156 return (options?.client ?? client).requestOptions({ 163 - responseStyle: 'data', 164 - method: 'POST', 165 - url: '/api/v{api-version}/parameters/{parameterPath}', 157 + responseStyle: "data", 158 + method: "POST", 159 + url: "/api/v{api-version}/parameters/{parameterPath}", 166 160 ...options 167 161 }); 168 162 } 169 163 170 164 public callWithWeirdParameterNames<ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> { 171 165 return (options?.client ?? client).requestOptions({ 172 - responseStyle: 'data', 173 - method: 'POST', 174 - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 166 + responseStyle: "data", 167 + method: "POST", 168 + url: "/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}", 175 169 ...options 176 170 }); 177 171 } 178 172 179 173 public getCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> { 180 174 return (options?.client ?? client).requestOptions({ 181 - responseStyle: 'data', 182 - method: 'GET', 183 - url: '/api/v{api-version}/parameters', 175 + responseStyle: "data", 176 + method: "GET", 177 + url: "/api/v{api-version}/parameters", 184 178 ...options 185 179 }); 186 180 } 187 181 188 182 public postCallWithOptionalParam<ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> { 189 183 return (options?.client ?? client).requestOptions({ 190 - responseStyle: 'data', 191 - method: 'POST', 192 - url: '/api/v{api-version}/parameters', 184 + responseStyle: "data", 185 + method: "POST", 186 + url: "/api/v{api-version}/parameters", 193 187 ...options 194 188 }); 195 189 } 196 190 } 197 191 198 - @Injectable({ 199 - providedIn: 'root' 200 - }) 192 + @Injectable({ providedIn: "root" }) 201 193 export class DescriptionsServiceRequests { 202 194 public callWithDescriptions<ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> { 203 195 return (options?.client ?? client).requestOptions({ 204 - responseStyle: 'data', 205 - method: 'POST', 206 - url: '/api/v{api-version}/descriptions', 196 + responseStyle: "data", 197 + method: "POST", 198 + url: "/api/v{api-version}/descriptions", 207 199 ...options 208 200 }); 209 201 } 210 202 } 211 203 212 - @Injectable({ 213 - providedIn: 'root' 214 - }) 204 + @Injectable({ providedIn: "root" }) 215 205 export class DeprecatedServiceRequests { 216 206 /** 217 207 * @deprecated 218 208 */ 219 209 public deprecatedCall<ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>): HttpRequest<unknown> { 220 210 return (options?.client ?? client).requestOptions({ 221 - responseStyle: 'data', 222 - method: 'POST', 223 - url: '/api/v{api-version}/parameters/deprecated', 211 + responseStyle: "data", 212 + method: "POST", 213 + url: "/api/v{api-version}/parameters/deprecated", 224 214 ...options 225 215 }); 226 216 } 227 217 } 228 218 229 - @Injectable({ 230 - providedIn: 'root' 231 - }) 219 + @Injectable({ providedIn: "root" }) 232 220 export class RequestBodyServiceRequests { 233 221 public postApiVbyApiVersionRequestBody<ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>): HttpRequest<unknown> { 234 222 return (options?.client ?? client).requestOptions({ 235 - responseStyle: 'data', 236 - method: 'POST', 237 - url: '/api/v{api-version}/requestBody', 223 + responseStyle: "data", 224 + method: "POST", 225 + url: "/api/v{api-version}/requestBody", 238 226 ...options 239 227 }); 240 228 } 241 229 } 242 230 243 - @Injectable({ 244 - providedIn: 'root' 245 - }) 231 + @Injectable({ providedIn: "root" }) 246 232 export class FormDataServiceRequests { 247 233 public postApiVbyApiVersionFormData<ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>): HttpRequest<unknown> { 248 234 return (options?.client ?? client).requestOptions({ 249 - responseStyle: 'data', 250 - method: 'POST', 251 - url: '/api/v{api-version}/formData', 235 + responseStyle: "data", 236 + method: "POST", 237 + url: "/api/v{api-version}/formData", 252 238 ...options 253 239 }); 254 240 } 255 241 } 256 242 257 - @Injectable({ 258 - providedIn: 'root' 259 - }) 243 + @Injectable({ providedIn: "root" }) 260 244 export class DefaultsServiceRequests { 261 245 public callWithDefaultParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> { 262 246 return (options?.client ?? client).requestOptions({ 263 - responseStyle: 'data', 264 - method: 'GET', 265 - url: '/api/v{api-version}/defaults', 247 + responseStyle: "data", 248 + method: "GET", 249 + url: "/api/v{api-version}/defaults", 266 250 ...options 267 251 }); 268 252 } 269 253 270 254 public callWithDefaultOptionalParameters<ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> { 271 255 return (options?.client ?? client).requestOptions({ 272 - responseStyle: 'data', 273 - method: 'POST', 274 - url: '/api/v{api-version}/defaults', 256 + responseStyle: "data", 257 + method: "POST", 258 + url: "/api/v{api-version}/defaults", 275 259 ...options 276 260 }); 277 261 } 278 262 279 263 public callToTestOrderOfParams<ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> { 280 264 return (options?.client ?? client).requestOptions({ 281 - responseStyle: 'data', 282 - method: 'PUT', 283 - url: '/api/v{api-version}/defaults', 265 + responseStyle: "data", 266 + method: "PUT", 267 + url: "/api/v{api-version}/defaults", 284 268 ...options 285 269 }); 286 270 } 287 271 } 288 272 289 - @Injectable({ 290 - providedIn: 'root' 291 - }) 273 + @Injectable({ providedIn: "root" }) 292 274 export class DuplicateServiceRequests { 293 275 public duplicateName<ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> { 294 276 return (options?.client ?? client).requestOptions({ 295 - responseStyle: 'data', 296 - method: 'DELETE', 297 - url: '/api/v{api-version}/duplicate', 277 + responseStyle: "data", 278 + method: "DELETE", 279 + url: "/api/v{api-version}/duplicate", 298 280 ...options 299 281 }); 300 282 } 301 283 302 284 public duplicateName2<ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> { 303 285 return (options?.client ?? client).requestOptions({ 304 - responseStyle: 'data', 305 - method: 'GET', 306 - url: '/api/v{api-version}/duplicate', 286 + responseStyle: "data", 287 + method: "GET", 288 + url: "/api/v{api-version}/duplicate", 307 289 ...options 308 290 }); 309 291 } 310 292 311 293 public duplicateName3<ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> { 312 294 return (options?.client ?? client).requestOptions({ 313 - responseStyle: 'data', 314 - method: 'POST', 315 - url: '/api/v{api-version}/duplicate', 295 + responseStyle: "data", 296 + method: "POST", 297 + url: "/api/v{api-version}/duplicate", 316 298 ...options 317 299 }); 318 300 } 319 301 320 302 public duplicateName4<ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> { 321 303 return (options?.client ?? client).requestOptions({ 322 - responseStyle: 'data', 323 - method: 'PUT', 324 - url: '/api/v{api-version}/duplicate', 304 + responseStyle: "data", 305 + method: "PUT", 306 + url: "/api/v{api-version}/duplicate", 325 307 ...options 326 308 }); 327 309 } 328 310 } 329 311 330 - @Injectable({ 331 - providedIn: 'root' 332 - }) 312 + @Injectable({ providedIn: "root" }) 333 313 export class NoContentServiceRequests { 334 314 public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 335 315 return (options?.client ?? client).requestOptions({ 336 - responseStyle: 'data', 337 - method: 'GET', 338 - url: '/api/v{api-version}/no-content', 316 + responseStyle: "data", 317 + method: "GET", 318 + url: "/api/v{api-version}/no-content", 339 319 ...options 340 320 }); 341 321 } 342 322 343 323 public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 344 324 return (options?.client ?? client).requestOptions({ 345 - responseStyle: 'data', 346 - method: 'GET', 347 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 325 + responseStyle: "data", 326 + method: "GET", 327 + url: "/api/v{api-version}/multiple-tags/response-and-no-content", 348 328 ...options 349 329 }); 350 330 } 351 331 } 352 332 353 - @Injectable({ 354 - providedIn: 'root' 355 - }) 333 + @Injectable({ providedIn: "root" }) 356 334 export class ResponseServiceRequests { 357 335 public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> { 358 336 return (options?.client ?? client).requestOptions({ 359 - responseStyle: 'data', 360 - method: 'GET', 361 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 337 + responseStyle: "data", 338 + method: "GET", 339 + url: "/api/v{api-version}/multiple-tags/response-and-no-content", 362 340 ...options 363 341 }); 364 342 } 365 343 366 344 public callWithResponse<ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<unknown> { 367 345 return (options?.client ?? client).requestOptions({ 368 - responseStyle: 'data', 369 - method: 'GET', 370 - url: '/api/v{api-version}/response', 346 + responseStyle: "data", 347 + method: "GET", 348 + url: "/api/v{api-version}/response", 371 349 ...options 372 350 }); 373 351 } 374 352 375 353 public callWithDuplicateResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<unknown> { 376 354 return (options?.client ?? client).requestOptions({ 377 - responseStyle: 'data', 378 - method: 'POST', 379 - url: '/api/v{api-version}/response', 355 + responseStyle: "data", 356 + method: "POST", 357 + url: "/api/v{api-version}/response", 380 358 ...options 381 359 }); 382 360 } 383 361 384 362 public callWithResponses<ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<unknown> { 385 363 return (options?.client ?? client).requestOptions({ 386 - responseStyle: 'data', 387 - method: 'PUT', 388 - url: '/api/v{api-version}/response', 364 + responseStyle: "data", 365 + method: "PUT", 366 + url: "/api/v{api-version}/response", 389 367 ...options 390 368 }); 391 369 } 392 370 } 393 371 394 - @Injectable({ 395 - providedIn: 'root' 396 - }) 372 + @Injectable({ providedIn: "root" }) 397 373 export class MultipleTags1ServiceRequests { 398 374 public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> { 399 375 return (options?.client ?? client).requestOptions({ 400 - responseStyle: 'data', 401 - method: 'GET', 402 - url: '/api/v{api-version}/multiple-tags/a', 376 + responseStyle: "data", 377 + method: "GET", 378 + url: "/api/v{api-version}/multiple-tags/a", 403 379 ...options 404 380 }); 405 381 } 406 382 407 383 public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 408 384 return (options?.client ?? client).requestOptions({ 409 - responseStyle: 'data', 410 - method: 'GET', 411 - url: '/api/v{api-version}/multiple-tags/b', 385 + responseStyle: "data", 386 + method: "GET", 387 + url: "/api/v{api-version}/multiple-tags/b", 412 388 ...options 413 389 }); 414 390 } 415 391 } 416 392 417 - @Injectable({ 418 - providedIn: 'root' 419 - }) 393 + @Injectable({ providedIn: "root" }) 420 394 export class MultipleTags2ServiceRequests { 421 395 public dummyA<ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> { 422 396 return (options?.client ?? client).requestOptions({ 423 - responseStyle: 'data', 424 - method: 'GET', 425 - url: '/api/v{api-version}/multiple-tags/a', 397 + responseStyle: "data", 398 + method: "GET", 399 + url: "/api/v{api-version}/multiple-tags/a", 426 400 ...options 427 401 }); 428 402 } 429 403 430 404 public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 431 405 return (options?.client ?? client).requestOptions({ 432 - responseStyle: 'data', 433 - method: 'GET', 434 - url: '/api/v{api-version}/multiple-tags/b', 406 + responseStyle: "data", 407 + method: "GET", 408 + url: "/api/v{api-version}/multiple-tags/b", 435 409 ...options 436 410 }); 437 411 } 438 412 } 439 413 440 - @Injectable({ 441 - providedIn: 'root' 442 - }) 414 + @Injectable({ providedIn: "root" }) 443 415 export class MultipleTags3ServiceRequests { 444 416 public dummyB<ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> { 445 417 return (options?.client ?? client).requestOptions({ 446 - responseStyle: 'data', 447 - method: 'GET', 448 - url: '/api/v{api-version}/multiple-tags/b', 418 + responseStyle: "data", 419 + method: "GET", 420 + url: "/api/v{api-version}/multiple-tags/b", 449 421 ...options 450 422 }); 451 423 } 452 424 } 453 425 454 - @Injectable({ 455 - providedIn: 'root' 456 - }) 426 + @Injectable({ providedIn: "root" }) 457 427 export class CollectionFormatServiceRequests { 458 428 public collectionFormat<ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> { 459 429 return (options?.client ?? client).requestOptions({ 460 - responseStyle: 'data', 461 - method: 'GET', 462 - url: '/api/v{api-version}/collectionFormat', 430 + responseStyle: "data", 431 + method: "GET", 432 + url: "/api/v{api-version}/collectionFormat", 463 433 ...options 464 434 }); 465 435 } 466 436 } 467 437 468 - @Injectable({ 469 - providedIn: 'root' 470 - }) 438 + @Injectable({ providedIn: "root" }) 471 439 export class TypesServiceRequests { 472 440 public types<ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<unknown> { 473 441 return (options?.client ?? client).requestOptions({ 474 - responseStyle: 'data', 475 - method: 'GET', 476 - url: '/api/v{api-version}/types', 442 + responseStyle: "data", 443 + method: "GET", 444 + url: "/api/v{api-version}/types", 477 445 ...options 478 446 }); 479 447 } 480 448 } 481 449 482 - @Injectable({ 483 - providedIn: 'root' 484 - }) 450 + @Injectable({ providedIn: "root" }) 485 451 export class UploadServiceRequests { 486 452 public uploadFile<ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): HttpRequest<unknown> { 487 453 return (options?.client ?? client).requestOptions({ 488 - responseStyle: 'data', 489 - method: 'POST', 490 - url: '/api/v{api-version}/upload', 454 + responseStyle: "data", 455 + method: "POST", 456 + url: "/api/v{api-version}/upload", 491 457 ...options 492 458 }); 493 459 } 494 460 } 495 461 496 - @Injectable({ 497 - providedIn: 'root' 498 - }) 462 + @Injectable({ providedIn: "root" }) 499 463 export class FileResponseServiceRequests { 500 464 public fileResponse<ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>): HttpRequest<unknown> { 501 465 return (options?.client ?? client).requestOptions({ 502 - responseStyle: 'data', 503 - method: 'GET', 504 - url: '/api/v{api-version}/file/{id}', 466 + responseStyle: "data", 467 + method: "GET", 468 + url: "/api/v{api-version}/file/{id}", 505 469 ...options 506 470 }); 507 471 } 508 472 } 509 473 510 - @Injectable({ 511 - providedIn: 'root' 512 - }) 474 + @Injectable({ providedIn: "root" }) 513 475 export class ComplexServiceRequests { 514 476 public complexTypes<ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<unknown> { 515 477 return (options?.client ?? client).requestOptions({ 516 - responseStyle: 'data', 517 - method: 'GET', 518 - url: '/api/v{api-version}/complex', 478 + responseStyle: "data", 479 + method: "GET", 480 + url: "/api/v{api-version}/complex", 519 481 ...options 520 482 }); 521 483 } 522 484 523 485 public complexParams<ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>): HttpRequest<unknown> { 524 486 return (options?.client ?? client).requestOptions({ 525 - responseStyle: 'data', 526 - method: 'PUT', 527 - url: '/api/v{api-version}/complex/{id}', 487 + responseStyle: "data", 488 + method: "PUT", 489 + url: "/api/v{api-version}/complex/{id}", 528 490 ...options 529 491 }); 530 492 } 531 493 } 532 494 533 - @Injectable({ 534 - providedIn: 'root' 535 - }) 495 + @Injectable({ providedIn: "root" }) 536 496 export class MultipartServiceRequests { 537 497 public multipartResponse<ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>): HttpRequest<unknown> { 538 498 return (options?.client ?? client).requestOptions({ 539 - responseStyle: 'data', 540 - method: 'GET', 541 - url: '/api/v{api-version}/multipart', 499 + responseStyle: "data", 500 + method: "GET", 501 + url: "/api/v{api-version}/multipart", 542 502 ...options 543 503 }); 544 504 } 545 505 546 506 public multipartRequest<ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>): HttpRequest<unknown> { 547 507 return (options?.client ?? client).requestOptions({ 548 - responseStyle: 'data', 549 - method: 'POST', 550 - url: '/api/v{api-version}/multipart', 508 + responseStyle: "data", 509 + method: "POST", 510 + url: "/api/v{api-version}/multipart", 551 511 ...options 552 512 }); 553 513 } 554 514 } 555 515 556 - @Injectable({ 557 - providedIn: 'root' 558 - }) 516 + @Injectable({ providedIn: "root" }) 559 517 export class HeaderServiceRequests { 560 518 public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> { 561 519 return (options?.client ?? client).requestOptions({ 562 - responseStyle: 'data', 563 - method: 'POST', 564 - url: '/api/v{api-version}/header', 520 + responseStyle: "data", 521 + method: "POST", 522 + url: "/api/v{api-version}/header", 565 523 ...options 566 524 }); 567 525 } 568 526 } 569 527 570 - @Injectable({ 571 - providedIn: 'root' 572 - }) 528 + @Injectable({ providedIn: "root" }) 573 529 export class ErrorServiceRequests { 574 530 public testErrorCode<ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> { 575 531 return (options?.client ?? client).requestOptions({ 576 - responseStyle: 'data', 577 - method: 'POST', 578 - url: '/api/v{api-version}/error', 532 + responseStyle: "data", 533 + method: "POST", 534 + url: "/api/v{api-version}/error", 579 535 ...options 580 536 }); 581 537 } 582 538 } 583 539 584 - @Injectable({ 585 - providedIn: 'root' 586 - }) 540 + @Injectable({ providedIn: "root" }) 587 541 export class NonAsciiÆøåÆøÅöôêÊServiceRequests { 588 542 public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<unknown> { 589 543 return (options?.client ?? client).requestOptions({ 590 - responseStyle: 'data', 591 - method: 'POST', 592 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 544 + responseStyle: "data", 545 + method: "POST", 546 + url: "/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串", 593 547 ...options 594 548 }); 595 549 } ··· 599 553 */ 600 554 public putWithFormUrlEncoded<ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>): HttpRequest<unknown> { 601 555 return (options?.client ?? client).requestOptions({ 602 - responseStyle: 'data', 603 - method: 'PUT', 604 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 556 + responseStyle: "data", 557 + method: "PUT", 558 + url: "/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串", 605 559 ...options 606 560 }); 607 561 } 608 562 } 609 563 610 - @Injectable({ 611 - providedIn: 'root' 612 - }) 564 + @Injectable({ providedIn: "root" }) 613 565 export class DefaultServiceResources { 614 566 public export<ThrowOnError extends boolean = false>(options?: () => Options<ExportData, ThrowOnError> | undefined) { 615 567 return httpResource<unknown>(() => { ··· 664 616 vVersionService = new VVersionServiceResources(); 665 617 } 666 618 667 - @Injectable({ 668 - providedIn: 'root' 669 - }) 619 + @Injectable({ providedIn: "root" }) 670 620 export class SimpleServiceResources { 671 621 public deleteCallWithoutParametersAndResponse<ThrowOnError extends boolean = false>(options?: () => Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError> | undefined) { 672 622 return httpResource<unknown>(() => { ··· 719 669 apiService = new ApiServiceResources(); 720 670 } 721 671 722 - @Injectable({ 723 - providedIn: 'root' 724 - }) 672 + @Injectable({ providedIn: "root" }) 725 673 export class ParametersServiceResources { 726 674 public deleteFoo<ThrowOnError extends boolean = false>(options: () => Options<DeleteFooData3, ThrowOnError> | undefined) { 727 675 return httpResource<unknown>(() => { ··· 759 707 } 760 708 } 761 709 762 - @Injectable({ 763 - providedIn: 'root' 764 - }) 710 + @Injectable({ providedIn: "root" }) 765 711 export class DescriptionsServiceResources { 766 712 public callWithDescriptions<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDescriptionsData, ThrowOnError> | undefined) { 767 713 return httpResource<unknown>(() => { ··· 771 717 } 772 718 } 773 719 774 - @Injectable({ 775 - providedIn: 'root' 776 - }) 720 + @Injectable({ providedIn: "root" }) 777 721 export class DeprecatedServiceResources { 778 722 /** 779 723 * @deprecated ··· 786 730 } 787 731 } 788 732 789 - @Injectable({ 790 - providedIn: 'root' 791 - }) 733 + @Injectable({ providedIn: "root" }) 792 734 export class RequestBodyServiceResources { 793 735 public postApiVbyApiVersionRequestBody<ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError> | undefined) { 794 736 return httpResource<unknown>(() => { ··· 798 740 } 799 741 } 800 742 801 - @Injectable({ 802 - providedIn: 'root' 803 - }) 743 + @Injectable({ providedIn: "root" }) 804 744 export class FormDataServiceResources { 805 745 public postApiVbyApiVersionFormData<ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionFormDataData, ThrowOnError> | undefined) { 806 746 return httpResource<unknown>(() => { ··· 810 750 } 811 751 } 812 752 813 - @Injectable({ 814 - providedIn: 'root' 815 - }) 753 + @Injectable({ providedIn: "root" }) 816 754 export class DefaultsServiceResources { 817 755 public callWithDefaultParameters<ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultParametersData, ThrowOnError> | undefined) { 818 756 return httpResource<unknown>(() => { ··· 836 774 } 837 775 } 838 776 839 - @Injectable({ 840 - providedIn: 'root' 841 - }) 777 + @Injectable({ providedIn: "root" }) 842 778 export class DuplicateServiceResources { 843 779 public duplicateName<ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) { 844 780 return httpResource<unknown>(() => { ··· 869 805 } 870 806 } 871 807 872 - @Injectable({ 873 - providedIn: 'root' 874 - }) 808 + @Injectable({ providedIn: "root" }) 875 809 export class NoContentServiceResources { 876 810 public callWithNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithNoContentResponseData, ThrowOnError> | undefined) { 877 811 return httpResource<CallWithNoContentResponseResponse>(() => { ··· 888 822 } 889 823 } 890 824 891 - @Injectable({ 892 - providedIn: 'root' 893 - }) 825 + @Injectable({ providedIn: "root" }) 894 826 export class ResponseServiceResources { 895 827 public callWithResponseAndNoContentResponse<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) { 896 828 return httpResource<CallWithResponseAndNoContentResponseResponse>(() => { ··· 921 853 } 922 854 } 923 855 924 - @Injectable({ 925 - providedIn: 'root' 926 - }) 856 + @Injectable({ providedIn: "root" }) 927 857 export class MultipleTags1ServiceResources { 928 858 public dummyA<ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) { 929 859 return httpResource<DummyAResponse>(() => { ··· 940 870 } 941 871 } 942 872 943 - @Injectable({ 944 - providedIn: 'root' 945 - }) 873 + @Injectable({ providedIn: "root" }) 946 874 export class MultipleTags2ServiceResources { 947 875 public dummyA<ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) { 948 876 return httpResource<DummyAResponse>(() => { ··· 959 887 } 960 888 } 961 889 962 - @Injectable({ 963 - providedIn: 'root' 964 - }) 890 + @Injectable({ providedIn: "root" }) 965 891 export class MultipleTags3ServiceResources { 966 892 public dummyB<ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) { 967 893 return httpResource<DummyBResponse>(() => { ··· 971 897 } 972 898 } 973 899 974 - @Injectable({ 975 - providedIn: 'root' 976 - }) 900 + @Injectable({ providedIn: "root" }) 977 901 export class CollectionFormatServiceResources { 978 902 public collectionFormat<ThrowOnError extends boolean = false>(options: () => Options<CollectionFormatData, ThrowOnError> | undefined) { 979 903 return httpResource<unknown>(() => { ··· 983 907 } 984 908 } 985 909 986 - @Injectable({ 987 - providedIn: 'root' 988 - }) 910 + @Injectable({ providedIn: "root" }) 989 911 export class TypesServiceResources { 990 912 public types<ThrowOnError extends boolean = false>(options: () => Options<TypesData, ThrowOnError> | undefined) { 991 913 return httpResource<TypesResponse>(() => { ··· 995 917 } 996 918 } 997 919 998 - @Injectable({ 999 - providedIn: 'root' 1000 - }) 920 + @Injectable({ providedIn: "root" }) 1001 921 export class UploadServiceResources { 1002 922 public uploadFile<ThrowOnError extends boolean = false>(options: () => Options<UploadFileData, ThrowOnError> | undefined) { 1003 923 return httpResource<UploadFileResponse>(() => { ··· 1007 927 } 1008 928 } 1009 929 1010 - @Injectable({ 1011 - providedIn: 'root' 1012 - }) 930 + @Injectable({ providedIn: "root" }) 1013 931 export class FileResponseServiceResources { 1014 932 public fileResponse<ThrowOnError extends boolean = false>(options: () => Options<FileResponseData, ThrowOnError> | undefined) { 1015 933 return httpResource<FileResponseResponse>(() => { ··· 1019 937 } 1020 938 } 1021 939 1022 - @Injectable({ 1023 - providedIn: 'root' 1024 - }) 940 + @Injectable({ providedIn: "root" }) 1025 941 export class ComplexServiceResources { 1026 942 public complexTypes<ThrowOnError extends boolean = false>(options: () => Options<ComplexTypesData, ThrowOnError> | undefined) { 1027 943 return httpResource<ComplexTypesResponse>(() => { ··· 1038 954 } 1039 955 } 1040 956 1041 - @Injectable({ 1042 - providedIn: 'root' 1043 - }) 957 + @Injectable({ providedIn: "root" }) 1044 958 export class MultipartServiceResources { 1045 959 public multipartResponse<ThrowOnError extends boolean = false>(options?: () => Options<MultipartResponseData, ThrowOnError> | undefined) { 1046 960 return httpResource<MultipartResponseResponse>(() => { ··· 1057 971 } 1058 972 } 1059 973 1060 - @Injectable({ 1061 - providedIn: 'root' 1062 - }) 974 + @Injectable({ providedIn: "root" }) 1063 975 export class HeaderServiceResources { 1064 976 public callWithResultFromHeader<ThrowOnError extends boolean = false>(options?: () => Options<CallWithResultFromHeaderData, ThrowOnError> | undefined) { 1065 977 return httpResource<unknown>(() => { ··· 1069 981 } 1070 982 } 1071 983 1072 - @Injectable({ 1073 - providedIn: 'root' 1074 - }) 984 + @Injectable({ providedIn: "root" }) 1075 985 export class ErrorServiceResources { 1076 986 public testErrorCode<ThrowOnError extends boolean = false>(options: () => Options<TestErrorCodeData, ThrowOnError> | undefined) { 1077 987 return httpResource<unknown>(() => { ··· 1081 991 } 1082 992 } 1083 993 1084 - @Injectable({ 1085 - providedIn: 'root' 1086 - }) 994 + @Injectable({ providedIn: "root" }) 1087 995 export class NonAsciiÆøåÆøÅöôêÊServiceResources { 1088 996 public nonAsciiæøåÆøÅöôêÊ字符串<ThrowOnError extends boolean = false>(options: () => Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError> | undefined) { 1089 997 return httpResource<NonAsciiæøåÆøÅöôêÊ字符串Response>(() => {
+480 -672
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/@angular/common.gen.ts
··· 6 6 import type { Options } from '../sdk.gen'; 7 7 import type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen'; 8 8 9 - export const exportRequest = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>): HttpRequest<unknown> => { 10 - return (options?.client ?? client).requestOptions({ 11 - responseStyle: 'data', 12 - method: 'GET', 13 - url: '/api/v{api-version}/no+tag', 14 - ...options 15 - }); 16 - }; 9 + export const exportRequest = <ThrowOnError extends boolean = false>(options?: Options<ExportData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 10 + responseStyle: "data", 11 + method: "GET", 12 + url: "/api/v{api-version}/no+tag", 13 + ...options 14 + }); 17 15 18 - export const patchApiVbyApiVersionNoTagRequest = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> => { 19 - return (options?.client ?? client).requestOptions({ 20 - responseStyle: 'data', 21 - method: 'PATCH', 22 - url: '/api/v{api-version}/no+tag', 23 - ...options 24 - }); 25 - }; 16 + export const patchApiVbyApiVersionNoTagRequest = <ThrowOnError extends boolean = false>(options?: Options<PatchApiVbyApiVersionNoTagData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 17 + responseStyle: "data", 18 + method: "PATCH", 19 + url: "/api/v{api-version}/no+tag", 20 + ...options 21 + }); 26 22 27 - export const importRequest = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>): HttpRequest<unknown> => { 28 - return (options?.client ?? client).requestOptions({ 29 - responseStyle: 'data', 30 - method: 'POST', 31 - url: '/api/v{api-version}/no+tag', 32 - ...options 33 - }); 34 - }; 23 + export const importRequest = <ThrowOnError extends boolean = false>(options: Options<ImportData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 24 + responseStyle: "data", 25 + method: "POST", 26 + url: "/api/v{api-version}/no+tag", 27 + ...options 28 + }); 35 29 36 - export const fooWowRequest = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> => { 37 - return (options?.client ?? client).requestOptions({ 38 - responseStyle: 'data', 39 - method: 'PUT', 40 - url: '/api/v{api-version}/no+tag', 41 - ...options 42 - }); 43 - }; 30 + export const fooWowRequest = <ThrowOnError extends boolean = false>(options?: Options<FooWowData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 31 + responseStyle: "data", 32 + method: "PUT", 33 + url: "/api/v{api-version}/no+tag", 34 + ...options 35 + }); 44 36 45 - export const apiVVersionODataControllerCountRequest = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>): HttpRequest<unknown> => { 46 - return (options?.client ?? client).requestOptions({ 47 - responseStyle: 'data', 48 - method: 'GET', 49 - url: '/api/v{api-version}/simple/$count', 50 - ...options 51 - }); 52 - }; 37 + export const apiVVersionODataControllerCountRequest = <ThrowOnError extends boolean = false>(options?: Options<ApiVVersionODataControllerCountData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 38 + responseStyle: "data", 39 + method: "GET", 40 + url: "/api/v{api-version}/simple/$count", 41 + ...options 42 + }); 53 43 54 - export const getApiVbyApiVersionSimpleOperationRequest = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>): HttpRequest<unknown> => { 55 - return (options?.client ?? client).requestOptions({ 56 - responseStyle: 'data', 57 - method: 'GET', 58 - url: '/api/v{api-version}/simple:operation', 59 - ...options 60 - }); 61 - }; 44 + export const getApiVbyApiVersionSimpleOperationRequest = <ThrowOnError extends boolean = false>(options: Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 45 + responseStyle: "data", 46 + method: "GET", 47 + url: "/api/v{api-version}/simple:operation", 48 + ...options 49 + }); 62 50 63 - export const deleteCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 64 - return (options?.client ?? client).requestOptions({ 65 - responseStyle: 'data', 66 - method: 'DELETE', 67 - url: '/api/v{api-version}/simple', 68 - ...options 69 - }); 70 - }; 51 + export const deleteCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 52 + responseStyle: "data", 53 + method: "DELETE", 54 + url: "/api/v{api-version}/simple", 55 + ...options 56 + }); 71 57 72 - export const getCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 73 - return (options?.client ?? client).requestOptions({ 74 - responseStyle: 'data', 75 - method: 'GET', 76 - url: '/api/v{api-version}/simple', 77 - ...options 78 - }); 79 - }; 58 + export const getCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<GetCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 59 + responseStyle: "data", 60 + method: "GET", 61 + url: "/api/v{api-version}/simple", 62 + ...options 63 + }); 80 64 81 - export const headCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 82 - return (options?.client ?? client).requestOptions({ 83 - responseStyle: 'data', 84 - method: 'HEAD', 85 - url: '/api/v{api-version}/simple', 86 - ...options 87 - }); 88 - }; 65 + export const headCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<HeadCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 66 + responseStyle: "data", 67 + method: "HEAD", 68 + url: "/api/v{api-version}/simple", 69 + ...options 70 + }); 89 71 90 - export const optionsCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 91 - return (options?.client ?? client).requestOptions({ 92 - responseStyle: 'data', 93 - method: 'OPTIONS', 94 - url: '/api/v{api-version}/simple', 95 - ...options 96 - }); 97 - }; 72 + export const optionsCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 73 + responseStyle: "data", 74 + method: "OPTIONS", 75 + url: "/api/v{api-version}/simple", 76 + ...options 77 + }); 98 78 99 - export const patchCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 100 - return (options?.client ?? client).requestOptions({ 101 - responseStyle: 'data', 102 - method: 'PATCH', 103 - url: '/api/v{api-version}/simple', 104 - ...options 105 - }); 106 - }; 79 + export const patchCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PatchCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 80 + responseStyle: "data", 81 + method: "PATCH", 82 + url: "/api/v{api-version}/simple", 83 + ...options 84 + }); 107 85 108 - export const postCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 109 - return (options?.client ?? client).requestOptions({ 110 - responseStyle: 'data', 111 - method: 'POST', 112 - url: '/api/v{api-version}/simple', 113 - ...options 114 - }); 115 - }; 86 + export const postCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PostCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 87 + responseStyle: "data", 88 + method: "POST", 89 + url: "/api/v{api-version}/simple", 90 + ...options 91 + }); 116 92 117 - export const putCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => { 118 - return (options?.client ?? client).requestOptions({ 119 - responseStyle: 'data', 120 - method: 'PUT', 121 - url: '/api/v{api-version}/simple', 122 - ...options 123 - }); 124 - }; 93 + export const putCallWithoutParametersAndResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<PutCallWithoutParametersAndResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 94 + responseStyle: "data", 95 + method: "PUT", 96 + url: "/api/v{api-version}/simple", 97 + ...options 98 + }); 125 99 126 - export const deleteFooRequest = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>): HttpRequest<unknown> => { 127 - return (options?.client ?? client).requestOptions({ 128 - responseStyle: 'data', 129 - method: 'DELETE', 130 - url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', 131 - ...options 132 - }); 133 - }; 100 + export const deleteFooRequest = <ThrowOnError extends boolean = false>(options: Options<DeleteFooData3, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 101 + responseStyle: "data", 102 + method: "DELETE", 103 + url: "/api/v{api-version}/foo/{foo_param}/bar/{BarParam}", 104 + ...options 105 + }); 134 106 135 - export const callWithDescriptionsRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> => { 136 - return (options?.client ?? client).requestOptions({ 137 - responseStyle: 'data', 138 - method: 'POST', 139 - url: '/api/v{api-version}/descriptions', 140 - ...options 141 - }); 142 - }; 107 + export const callWithDescriptionsRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDescriptionsData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 108 + responseStyle: "data", 109 + method: "POST", 110 + url: "/api/v{api-version}/descriptions", 111 + ...options 112 + }); 143 113 144 114 /** 145 115 * @deprecated 146 116 */ 147 - export const deprecatedCallRequest = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>): HttpRequest<unknown> => { 148 - return (options?.client ?? client).requestOptions({ 149 - responseStyle: 'data', 150 - method: 'POST', 151 - url: '/api/v{api-version}/parameters/deprecated', 152 - ...options 153 - }); 154 - }; 117 + export const deprecatedCallRequest = <ThrowOnError extends boolean = false>(options: Options<DeprecatedCallData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 118 + responseStyle: "data", 119 + method: "POST", 120 + url: "/api/v{api-version}/parameters/deprecated", 121 + ...options 122 + }); 155 123 156 - export const callWithParametersRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> => { 157 - return (options?.client ?? client).requestOptions({ 158 - responseStyle: 'data', 159 - method: 'POST', 160 - url: '/api/v{api-version}/parameters/{parameterPath}', 161 - ...options 162 - }); 163 - }; 124 + export const callWithParametersRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithParametersData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 125 + responseStyle: "data", 126 + method: "POST", 127 + url: "/api/v{api-version}/parameters/{parameterPath}", 128 + ...options 129 + }); 164 130 165 - export const callWithWeirdParameterNamesRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> => { 166 - return (options?.client ?? client).requestOptions({ 167 - responseStyle: 'data', 168 - method: 'POST', 169 - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 170 - ...options 171 - }); 172 - }; 131 + export const callWithWeirdParameterNamesRequest = <ThrowOnError extends boolean = false>(options: Options<CallWithWeirdParameterNamesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 132 + responseStyle: "data", 133 + method: "POST", 134 + url: "/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}", 135 + ...options 136 + }); 173 137 174 - export const getCallWithOptionalParamRequest = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> => { 175 - return (options?.client ?? client).requestOptions({ 176 - responseStyle: 'data', 177 - method: 'GET', 178 - url: '/api/v{api-version}/parameters', 179 - ...options 180 - }); 181 - }; 138 + export const getCallWithOptionalParamRequest = <ThrowOnError extends boolean = false>(options: Options<GetCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 139 + responseStyle: "data", 140 + method: "GET", 141 + url: "/api/v{api-version}/parameters", 142 + ...options 143 + }); 182 144 183 - export const postCallWithOptionalParamRequest = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> => { 184 - return (options?.client ?? client).requestOptions({ 185 - responseStyle: 'data', 186 - method: 'POST', 187 - url: '/api/v{api-version}/parameters', 188 - ...options 189 - }); 190 - }; 145 + export const postCallWithOptionalParamRequest = <ThrowOnError extends boolean = false>(options: Options<PostCallWithOptionalParamData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 146 + responseStyle: "data", 147 + method: "POST", 148 + url: "/api/v{api-version}/parameters", 149 + ...options 150 + }); 191 151 192 - export const postApiVbyApiVersionRequestBodyRequest = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>): HttpRequest<unknown> => { 193 - return (options?.client ?? client).requestOptions({ 194 - responseStyle: 'data', 195 - method: 'POST', 196 - url: '/api/v{api-version}/requestBody', 197 - ...options 198 - }); 199 - }; 152 + export const postApiVbyApiVersionRequestBodyRequest = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 153 + responseStyle: "data", 154 + method: "POST", 155 + url: "/api/v{api-version}/requestBody", 156 + ...options 157 + }); 200 158 201 - export const postApiVbyApiVersionFormDataRequest = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>): HttpRequest<unknown> => { 202 - return (options?.client ?? client).requestOptions({ 203 - responseStyle: 'data', 204 - method: 'POST', 205 - url: '/api/v{api-version}/formData', 206 - ...options 207 - }); 208 - }; 159 + export const postApiVbyApiVersionFormDataRequest = <ThrowOnError extends boolean = false>(options?: Options<PostApiVbyApiVersionFormDataData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 160 + responseStyle: "data", 161 + method: "POST", 162 + url: "/api/v{api-version}/formData", 163 + ...options 164 + }); 209 165 210 - export const callWithDefaultParametersRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> => { 211 - return (options?.client ?? client).requestOptions({ 212 - responseStyle: 'data', 213 - method: 'GET', 214 - url: '/api/v{api-version}/defaults', 215 - ...options 216 - }); 217 - }; 166 + export const callWithDefaultParametersRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultParametersData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 167 + responseStyle: "data", 168 + method: "GET", 169 + url: "/api/v{api-version}/defaults", 170 + ...options 171 + }); 218 172 219 - export const callWithDefaultOptionalParametersRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> => { 220 - return (options?.client ?? client).requestOptions({ 221 - responseStyle: 'data', 222 - method: 'POST', 223 - url: '/api/v{api-version}/defaults', 224 - ...options 225 - }); 226 - }; 173 + export const callWithDefaultOptionalParametersRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDefaultOptionalParametersData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 174 + responseStyle: "data", 175 + method: "POST", 176 + url: "/api/v{api-version}/defaults", 177 + ...options 178 + }); 227 179 228 - export const callToTestOrderOfParamsRequest = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> => { 229 - return (options?.client ?? client).requestOptions({ 230 - responseStyle: 'data', 231 - method: 'PUT', 232 - url: '/api/v{api-version}/defaults', 233 - ...options 234 - }); 235 - }; 180 + export const callToTestOrderOfParamsRequest = <ThrowOnError extends boolean = false>(options: Options<CallToTestOrderOfParamsData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 181 + responseStyle: "data", 182 + method: "PUT", 183 + url: "/api/v{api-version}/defaults", 184 + ...options 185 + }); 236 186 237 - export const duplicateNameRequest = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> => { 238 - return (options?.client ?? client).requestOptions({ 239 - responseStyle: 'data', 240 - method: 'DELETE', 241 - url: '/api/v{api-version}/duplicate', 242 - ...options 243 - }); 244 - }; 187 + export const duplicateNameRequest = <ThrowOnError extends boolean = false>(options?: Options<DuplicateNameData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 188 + responseStyle: "data", 189 + method: "DELETE", 190 + url: "/api/v{api-version}/duplicate", 191 + ...options 192 + }); 245 193 246 - export const duplicateName2Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> => { 247 - return (options?.client ?? client).requestOptions({ 248 - responseStyle: 'data', 249 - method: 'GET', 250 - url: '/api/v{api-version}/duplicate', 251 - ...options 252 - }); 253 - }; 194 + export const duplicateName2Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName2Data, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 195 + responseStyle: "data", 196 + method: "GET", 197 + url: "/api/v{api-version}/duplicate", 198 + ...options 199 + }); 254 200 255 - export const duplicateName3Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> => { 256 - return (options?.client ?? client).requestOptions({ 257 - responseStyle: 'data', 258 - method: 'POST', 259 - url: '/api/v{api-version}/duplicate', 260 - ...options 261 - }); 262 - }; 201 + export const duplicateName3Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName3Data, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 202 + responseStyle: "data", 203 + method: "POST", 204 + url: "/api/v{api-version}/duplicate", 205 + ...options 206 + }); 263 207 264 - export const duplicateName4Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> => { 265 - return (options?.client ?? client).requestOptions({ 266 - responseStyle: 'data', 267 - method: 'PUT', 268 - url: '/api/v{api-version}/duplicate', 269 - ...options 270 - }); 271 - }; 208 + export const duplicateName4Request = <ThrowOnError extends boolean = false>(options?: Options<DuplicateName4Data, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 209 + responseStyle: "data", 210 + method: "PUT", 211 + url: "/api/v{api-version}/duplicate", 212 + ...options 213 + }); 272 214 273 - export const callWithNoContentResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> => { 274 - return (options?.client ?? client).requestOptions({ 275 - responseStyle: 'data', 276 - method: 'GET', 277 - url: '/api/v{api-version}/no-content', 278 - ...options 279 - }); 280 - }; 215 + export const callWithNoContentResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithNoContentResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 216 + responseStyle: "data", 217 + method: "GET", 218 + url: "/api/v{api-version}/no-content", 219 + ...options 220 + }); 281 221 282 - export const callWithResponseAndNoContentResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> => { 283 - return (options?.client ?? client).requestOptions({ 284 - responseStyle: 'data', 285 - method: 'GET', 286 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 287 - ...options 288 - }); 289 - }; 222 + export const callWithResponseAndNoContentResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseAndNoContentResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 223 + responseStyle: "data", 224 + method: "GET", 225 + url: "/api/v{api-version}/multiple-tags/response-and-no-content", 226 + ...options 227 + }); 290 228 291 - export const dummyARequest = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> => { 292 - return (options?.client ?? client).requestOptions({ 293 - responseStyle: 'data', 294 - method: 'GET', 295 - url: '/api/v{api-version}/multiple-tags/a', 296 - ...options 297 - }); 298 - }; 229 + export const dummyARequest = <ThrowOnError extends boolean = false>(options?: Options<DummyAData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 230 + responseStyle: "data", 231 + method: "GET", 232 + url: "/api/v{api-version}/multiple-tags/a", 233 + ...options 234 + }); 299 235 300 - export const dummyBRequest = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> => { 301 - return (options?.client ?? client).requestOptions({ 302 - responseStyle: 'data', 303 - method: 'GET', 304 - url: '/api/v{api-version}/multiple-tags/b', 305 - ...options 306 - }); 307 - }; 236 + export const dummyBRequest = <ThrowOnError extends boolean = false>(options?: Options<DummyBData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 237 + responseStyle: "data", 238 + method: "GET", 239 + url: "/api/v{api-version}/multiple-tags/b", 240 + ...options 241 + }); 308 242 309 - export const callWithResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<unknown> => { 310 - return (options?.client ?? client).requestOptions({ 311 - responseStyle: 'data', 312 - method: 'GET', 313 - url: '/api/v{api-version}/response', 314 - ...options 315 - }); 316 - }; 243 + export const callWithResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 244 + responseStyle: "data", 245 + method: "GET", 246 + url: "/api/v{api-version}/response", 247 + ...options 248 + }); 317 249 318 - export const callWithDuplicateResponsesRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<unknown> => { 319 - return (options?.client ?? client).requestOptions({ 320 - responseStyle: 'data', 321 - method: 'POST', 322 - url: '/api/v{api-version}/response', 323 - ...options 324 - }); 325 - }; 250 + export const callWithDuplicateResponsesRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithDuplicateResponsesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 251 + responseStyle: "data", 252 + method: "POST", 253 + url: "/api/v{api-version}/response", 254 + ...options 255 + }); 326 256 327 - export const callWithResponsesRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<unknown> => { 328 - return (options?.client ?? client).requestOptions({ 329 - responseStyle: 'data', 330 - method: 'PUT', 331 - url: '/api/v{api-version}/response', 332 - ...options 333 - }); 334 - }; 257 + export const callWithResponsesRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResponsesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 258 + responseStyle: "data", 259 + method: "PUT", 260 + url: "/api/v{api-version}/response", 261 + ...options 262 + }); 335 263 336 - export const collectionFormatRequest = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> => { 337 - return (options?.client ?? client).requestOptions({ 338 - responseStyle: 'data', 339 - method: 'GET', 340 - url: '/api/v{api-version}/collectionFormat', 341 - ...options 342 - }); 343 - }; 264 + export const collectionFormatRequest = <ThrowOnError extends boolean = false>(options: Options<CollectionFormatData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 265 + responseStyle: "data", 266 + method: "GET", 267 + url: "/api/v{api-version}/collectionFormat", 268 + ...options 269 + }); 344 270 345 - export const typesRequest = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<unknown> => { 346 - return (options?.client ?? client).requestOptions({ 347 - responseStyle: 'data', 348 - method: 'GET', 349 - url: '/api/v{api-version}/types', 350 - ...options 351 - }); 352 - }; 271 + export const typesRequest = <ThrowOnError extends boolean = false>(options: Options<TypesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 272 + responseStyle: "data", 273 + method: "GET", 274 + url: "/api/v{api-version}/types", 275 + ...options 276 + }); 353 277 354 - export const uploadFileRequest = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): HttpRequest<unknown> => { 355 - return (options?.client ?? client).requestOptions({ 356 - responseStyle: 'data', 357 - method: 'POST', 358 - url: '/api/v{api-version}/upload', 359 - ...options 360 - }); 361 - }; 278 + export const uploadFileRequest = <ThrowOnError extends boolean = false>(options: Options<UploadFileData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 279 + responseStyle: "data", 280 + method: "POST", 281 + url: "/api/v{api-version}/upload", 282 + ...options 283 + }); 362 284 363 - export const fileResponseRequest = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>): HttpRequest<unknown> => { 364 - return (options?.client ?? client).requestOptions({ 365 - responseStyle: 'data', 366 - method: 'GET', 367 - url: '/api/v{api-version}/file/{id}', 368 - ...options 369 - }); 370 - }; 285 + export const fileResponseRequest = <ThrowOnError extends boolean = false>(options: Options<FileResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 286 + responseStyle: "data", 287 + method: "GET", 288 + url: "/api/v{api-version}/file/{id}", 289 + ...options 290 + }); 371 291 372 - export const complexTypesRequest = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<unknown> => { 373 - return (options?.client ?? client).requestOptions({ 374 - responseStyle: 'data', 375 - method: 'GET', 376 - url: '/api/v{api-version}/complex', 377 - ...options 378 - }); 379 - }; 292 + export const complexTypesRequest = <ThrowOnError extends boolean = false>(options: Options<ComplexTypesData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 293 + responseStyle: "data", 294 + method: "GET", 295 + url: "/api/v{api-version}/complex", 296 + ...options 297 + }); 380 298 381 - export const multipartResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>): HttpRequest<unknown> => { 382 - return (options?.client ?? client).requestOptions({ 383 - responseStyle: 'data', 384 - method: 'GET', 385 - url: '/api/v{api-version}/multipart', 386 - ...options 387 - }); 388 - }; 299 + export const multipartResponseRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartResponseData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 300 + responseStyle: "data", 301 + method: "GET", 302 + url: "/api/v{api-version}/multipart", 303 + ...options 304 + }); 389 305 390 - export const multipartRequestRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>): HttpRequest<unknown> => { 391 - return (options?.client ?? client).requestOptions({ 392 - responseStyle: 'data', 393 - method: 'POST', 394 - url: '/api/v{api-version}/multipart', 395 - ...options 396 - }); 397 - }; 306 + export const multipartRequestRequest = <ThrowOnError extends boolean = false>(options?: Options<MultipartRequestData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 307 + responseStyle: "data", 308 + method: "POST", 309 + url: "/api/v{api-version}/multipart", 310 + ...options 311 + }); 398 312 399 - export const complexParamsRequest = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>): HttpRequest<unknown> => { 400 - return (options?.client ?? client).requestOptions({ 401 - responseStyle: 'data', 402 - method: 'PUT', 403 - url: '/api/v{api-version}/complex/{id}', 404 - ...options 405 - }); 406 - }; 313 + export const complexParamsRequest = <ThrowOnError extends boolean = false>(options: Options<ComplexParamsData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 314 + responseStyle: "data", 315 + method: "PUT", 316 + url: "/api/v{api-version}/complex/{id}", 317 + ...options 318 + }); 407 319 408 - export const callWithResultFromHeaderRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> => { 409 - return (options?.client ?? client).requestOptions({ 410 - responseStyle: 'data', 411 - method: 'POST', 412 - url: '/api/v{api-version}/header', 413 - ...options 414 - }); 415 - }; 320 + export const callWithResultFromHeaderRequest = <ThrowOnError extends boolean = false>(options?: Options<CallWithResultFromHeaderData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 321 + responseStyle: "data", 322 + method: "POST", 323 + url: "/api/v{api-version}/header", 324 + ...options 325 + }); 416 326 417 - export const testErrorCodeRequest = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> => { 418 - return (options?.client ?? client).requestOptions({ 419 - responseStyle: 'data', 420 - method: 'POST', 421 - url: '/api/v{api-version}/error', 422 - ...options 423 - }); 424 - }; 327 + export const testErrorCodeRequest = <ThrowOnError extends boolean = false>(options: Options<TestErrorCodeData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 328 + responseStyle: "data", 329 + method: "POST", 330 + url: "/api/v{api-version}/error", 331 + ...options 332 + }); 425 333 426 - export const nonAsciiæøåÆøÅöôêÊ字符串Request = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<unknown> => { 427 - return (options?.client ?? client).requestOptions({ 428 - responseStyle: 'data', 429 - method: 'POST', 430 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 431 - ...options 432 - }); 433 - }; 334 + export const nonAsciiæøåÆøÅöôêÊ字符串Request = <ThrowOnError extends boolean = false>(options: Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 335 + responseStyle: "data", 336 + method: "POST", 337 + url: "/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串", 338 + ...options 339 + }); 434 340 435 341 /** 436 342 * Login User 437 343 */ 438 - export const putWithFormUrlEncodedRequest = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>): HttpRequest<unknown> => { 439 - return (options?.client ?? client).requestOptions({ 440 - responseStyle: 'data', 441 - method: 'PUT', 442 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 443 - ...options 444 - }); 445 - }; 344 + export const putWithFormUrlEncodedRequest = <ThrowOnError extends boolean = false>(options: Options<PutWithFormUrlEncodedData, ThrowOnError>): HttpRequest<unknown> => (options?.client ?? client).requestOptions({ 345 + responseStyle: "data", 346 + method: "PUT", 347 + url: "/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串", 348 + ...options 349 + }); 446 350 447 - export const exportResource = <ThrowOnError extends boolean = false>(options?: () => Options<ExportData, ThrowOnError> | undefined) => { 448 - return httpResource<unknown>(() => { 449 - const opts = options ? options() : undefined; 450 - return opts ? exportRequest(opts) : undefined; 451 - }); 452 - }; 351 + export const exportResource = <ThrowOnError extends boolean = false>(options?: () => Options<ExportData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 352 + const opts = options ? options() : undefined; 353 + return opts ? exportRequest(opts) : undefined; 354 + }); 453 355 454 - export const patchApiVbyApiVersionNoTagResource = <ThrowOnError extends boolean = false>(options?: () => Options<PatchApiVbyApiVersionNoTagData, ThrowOnError> | undefined) => { 455 - return httpResource<unknown>(() => { 456 - const opts = options ? options() : undefined; 457 - return opts ? patchApiVbyApiVersionNoTagRequest(opts) : undefined; 458 - }); 459 - }; 356 + export const patchApiVbyApiVersionNoTagResource = <ThrowOnError extends boolean = false>(options?: () => Options<PatchApiVbyApiVersionNoTagData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 357 + const opts = options ? options() : undefined; 358 + return opts ? patchApiVbyApiVersionNoTagRequest(opts) : undefined; 359 + }); 460 360 461 - export const importResource = <ThrowOnError extends boolean = false>(options: () => Options<ImportData, ThrowOnError> | undefined) => { 462 - return httpResource<ImportResponse>(() => { 463 - const opts = options ? options() : undefined; 464 - return opts ? importRequest(opts) : undefined; 465 - }); 466 - }; 361 + export const importResource = <ThrowOnError extends boolean = false>(options: () => Options<ImportData, ThrowOnError> | undefined) => httpResource<ImportResponse>(() => { 362 + const opts = options ? options() : undefined; 363 + return opts ? importRequest(opts) : undefined; 364 + }); 467 365 468 - export const fooWowResource = <ThrowOnError extends boolean = false>(options?: () => Options<FooWowData, ThrowOnError> | undefined) => { 469 - return httpResource<unknown>(() => { 470 - const opts = options ? options() : undefined; 471 - return opts ? fooWowRequest(opts) : undefined; 472 - }); 473 - }; 366 + export const fooWowResource = <ThrowOnError extends boolean = false>(options?: () => Options<FooWowData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 367 + const opts = options ? options() : undefined; 368 + return opts ? fooWowRequest(opts) : undefined; 369 + }); 474 370 475 - export const apiVVersionODataControllerCountResource = <ThrowOnError extends boolean = false>(options?: () => Options<ApiVVersionODataControllerCountData, ThrowOnError> | undefined) => { 476 - return httpResource<ApiVVersionODataControllerCountResponse>(() => { 477 - const opts = options ? options() : undefined; 478 - return opts ? apiVVersionODataControllerCountRequest(opts) : undefined; 479 - }); 480 - }; 371 + export const apiVVersionODataControllerCountResource = <ThrowOnError extends boolean = false>(options?: () => Options<ApiVVersionODataControllerCountData, ThrowOnError> | undefined) => httpResource<ApiVVersionODataControllerCountResponse>(() => { 372 + const opts = options ? options() : undefined; 373 + return opts ? apiVVersionODataControllerCountRequest(opts) : undefined; 374 + }); 481 375 482 - export const getApiVbyApiVersionSimpleOperationResource = <ThrowOnError extends boolean = false>(options: () => Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError> | undefined) => { 483 - return httpResource<GetApiVbyApiVersionSimpleOperationResponse>(() => { 484 - const opts = options ? options() : undefined; 485 - return opts ? getApiVbyApiVersionSimpleOperationRequest(opts) : undefined; 486 - }); 487 - }; 376 + export const getApiVbyApiVersionSimpleOperationResource = <ThrowOnError extends boolean = false>(options: () => Options<GetApiVbyApiVersionSimpleOperationData, ThrowOnError> | undefined) => httpResource<GetApiVbyApiVersionSimpleOperationResponse>(() => { 377 + const opts = options ? options() : undefined; 378 + return opts ? getApiVbyApiVersionSimpleOperationRequest(opts) : undefined; 379 + }); 488 380 489 - export const deleteCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 490 - return httpResource<unknown>(() => { 491 - const opts = options ? options() : undefined; 492 - return opts ? deleteCallWithoutParametersAndResponseRequest(opts) : undefined; 493 - }); 494 - }; 381 + export const deleteCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<DeleteCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 382 + const opts = options ? options() : undefined; 383 + return opts ? deleteCallWithoutParametersAndResponseRequest(opts) : undefined; 384 + }); 495 385 496 - export const getCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<GetCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 497 - return httpResource<unknown>(() => { 498 - const opts = options ? options() : undefined; 499 - return opts ? getCallWithoutParametersAndResponseRequest(opts) : undefined; 500 - }); 501 - }; 386 + export const getCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<GetCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 387 + const opts = options ? options() : undefined; 388 + return opts ? getCallWithoutParametersAndResponseRequest(opts) : undefined; 389 + }); 502 390 503 - export const headCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<HeadCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 504 - return httpResource<unknown>(() => { 505 - const opts = options ? options() : undefined; 506 - return opts ? headCallWithoutParametersAndResponseRequest(opts) : undefined; 507 - }); 508 - }; 391 + export const headCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<HeadCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 392 + const opts = options ? options() : undefined; 393 + return opts ? headCallWithoutParametersAndResponseRequest(opts) : undefined; 394 + }); 509 395 510 - export const optionsCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 511 - return httpResource<unknown>(() => { 512 - const opts = options ? options() : undefined; 513 - return opts ? optionsCallWithoutParametersAndResponseRequest(opts) : undefined; 514 - }); 515 - }; 396 + export const optionsCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<OptionsCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 397 + const opts = options ? options() : undefined; 398 + return opts ? optionsCallWithoutParametersAndResponseRequest(opts) : undefined; 399 + }); 516 400 517 - export const patchCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PatchCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 518 - return httpResource<unknown>(() => { 519 - const opts = options ? options() : undefined; 520 - return opts ? patchCallWithoutParametersAndResponseRequest(opts) : undefined; 521 - }); 522 - }; 401 + export const patchCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PatchCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 402 + const opts = options ? options() : undefined; 403 + return opts ? patchCallWithoutParametersAndResponseRequest(opts) : undefined; 404 + }); 523 405 524 - export const postCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 525 - return httpResource<unknown>(() => { 526 - const opts = options ? options() : undefined; 527 - return opts ? postCallWithoutParametersAndResponseRequest(opts) : undefined; 528 - }); 529 - }; 406 + export const postCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 407 + const opts = options ? options() : undefined; 408 + return opts ? postCallWithoutParametersAndResponseRequest(opts) : undefined; 409 + }); 530 410 531 - export const putCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PutCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => { 532 - return httpResource<unknown>(() => { 533 - const opts = options ? options() : undefined; 534 - return opts ? putCallWithoutParametersAndResponseRequest(opts) : undefined; 535 - }); 536 - }; 411 + export const putCallWithoutParametersAndResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<PutCallWithoutParametersAndResponseData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 412 + const opts = options ? options() : undefined; 413 + return opts ? putCallWithoutParametersAndResponseRequest(opts) : undefined; 414 + }); 537 415 538 - export const deleteFooResource = <ThrowOnError extends boolean = false>(options: () => Options<DeleteFooData3, ThrowOnError> | undefined) => { 539 - return httpResource<unknown>(() => { 540 - const opts = options ? options() : undefined; 541 - return opts ? deleteFooRequest(opts) : undefined; 542 - }); 543 - }; 416 + export const deleteFooResource = <ThrowOnError extends boolean = false>(options: () => Options<DeleteFooData3, ThrowOnError> | undefined) => httpResource<unknown>(() => { 417 + const opts = options ? options() : undefined; 418 + return opts ? deleteFooRequest(opts) : undefined; 419 + }); 544 420 545 - export const callWithDescriptionsResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDescriptionsData, ThrowOnError> | undefined) => { 546 - return httpResource<unknown>(() => { 547 - const opts = options ? options() : undefined; 548 - return opts ? callWithDescriptionsRequest(opts) : undefined; 549 - }); 550 - }; 421 + export const callWithDescriptionsResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDescriptionsData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 422 + const opts = options ? options() : undefined; 423 + return opts ? callWithDescriptionsRequest(opts) : undefined; 424 + }); 551 425 552 426 /** 553 427 * @deprecated 554 428 */ 555 - export const deprecatedCallResource = <ThrowOnError extends boolean = false>(options: () => Options<DeprecatedCallData, ThrowOnError> | undefined) => { 556 - return httpResource<unknown>(() => { 557 - const opts = options ? options() : undefined; 558 - return opts ? deprecatedCallRequest(opts) : undefined; 559 - }); 560 - }; 429 + export const deprecatedCallResource = <ThrowOnError extends boolean = false>(options: () => Options<DeprecatedCallData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 430 + const opts = options ? options() : undefined; 431 + return opts ? deprecatedCallRequest(opts) : undefined; 432 + }); 561 433 562 - export const callWithParametersResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithParametersData, ThrowOnError> | undefined) => { 563 - return httpResource<unknown>(() => { 564 - const opts = options ? options() : undefined; 565 - return opts ? callWithParametersRequest(opts) : undefined; 566 - }); 567 - }; 434 + export const callWithParametersResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithParametersData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 435 + const opts = options ? options() : undefined; 436 + return opts ? callWithParametersRequest(opts) : undefined; 437 + }); 568 438 569 - export const callWithWeirdParameterNamesResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithWeirdParameterNamesData, ThrowOnError> | undefined) => { 570 - return httpResource<unknown>(() => { 571 - const opts = options ? options() : undefined; 572 - return opts ? callWithWeirdParameterNamesRequest(opts) : undefined; 573 - }); 574 - }; 439 + export const callWithWeirdParameterNamesResource = <ThrowOnError extends boolean = false>(options: () => Options<CallWithWeirdParameterNamesData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 440 + const opts = options ? options() : undefined; 441 + return opts ? callWithWeirdParameterNamesRequest(opts) : undefined; 442 + }); 575 443 576 - export const getCallWithOptionalParamResource = <ThrowOnError extends boolean = false>(options: () => Options<GetCallWithOptionalParamData, ThrowOnError> | undefined) => { 577 - return httpResource<unknown>(() => { 578 - const opts = options ? options() : undefined; 579 - return opts ? getCallWithOptionalParamRequest(opts) : undefined; 580 - }); 581 - }; 444 + export const getCallWithOptionalParamResource = <ThrowOnError extends boolean = false>(options: () => Options<GetCallWithOptionalParamData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 445 + const opts = options ? options() : undefined; 446 + return opts ? getCallWithOptionalParamRequest(opts) : undefined; 447 + }); 582 448 583 - export const postCallWithOptionalParamResource = <ThrowOnError extends boolean = false>(options: () => Options<PostCallWithOptionalParamData, ThrowOnError> | undefined) => { 584 - return httpResource<PostCallWithOptionalParamResponse>(() => { 585 - const opts = options ? options() : undefined; 586 - return opts ? postCallWithOptionalParamRequest(opts) : undefined; 587 - }); 588 - }; 449 + export const postCallWithOptionalParamResource = <ThrowOnError extends boolean = false>(options: () => Options<PostCallWithOptionalParamData, ThrowOnError> | undefined) => httpResource<PostCallWithOptionalParamResponse>(() => { 450 + const opts = options ? options() : undefined; 451 + return opts ? postCallWithOptionalParamRequest(opts) : undefined; 452 + }); 589 453 590 - export const postApiVbyApiVersionRequestBodyResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError> | undefined) => { 591 - return httpResource<unknown>(() => { 592 - const opts = options ? options() : undefined; 593 - return opts ? postApiVbyApiVersionRequestBodyRequest(opts) : undefined; 594 - }); 595 - }; 454 + export const postApiVbyApiVersionRequestBodyResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionRequestBodyData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 455 + const opts = options ? options() : undefined; 456 + return opts ? postApiVbyApiVersionRequestBodyRequest(opts) : undefined; 457 + }); 596 458 597 - export const postApiVbyApiVersionFormDataResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionFormDataData, ThrowOnError> | undefined) => { 598 - return httpResource<unknown>(() => { 599 - const opts = options ? options() : undefined; 600 - return opts ? postApiVbyApiVersionFormDataRequest(opts) : undefined; 601 - }); 602 - }; 459 + export const postApiVbyApiVersionFormDataResource = <ThrowOnError extends boolean = false>(options?: () => Options<PostApiVbyApiVersionFormDataData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 460 + const opts = options ? options() : undefined; 461 + return opts ? postApiVbyApiVersionFormDataRequest(opts) : undefined; 462 + }); 603 463 604 - export const callWithDefaultParametersResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultParametersData, ThrowOnError> | undefined) => { 605 - return httpResource<unknown>(() => { 606 - const opts = options ? options() : undefined; 607 - return opts ? callWithDefaultParametersRequest(opts) : undefined; 608 - }); 609 - }; 464 + export const callWithDefaultParametersResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultParametersData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 465 + const opts = options ? options() : undefined; 466 + return opts ? callWithDefaultParametersRequest(opts) : undefined; 467 + }); 610 468 611 - export const callWithDefaultOptionalParametersResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultOptionalParametersData, ThrowOnError> | undefined) => { 612 - return httpResource<unknown>(() => { 613 - const opts = options ? options() : undefined; 614 - return opts ? callWithDefaultOptionalParametersRequest(opts) : undefined; 615 - }); 616 - }; 469 + export const callWithDefaultOptionalParametersResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDefaultOptionalParametersData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 470 + const opts = options ? options() : undefined; 471 + return opts ? callWithDefaultOptionalParametersRequest(opts) : undefined; 472 + }); 617 473 618 - export const callToTestOrderOfParamsResource = <ThrowOnError extends boolean = false>(options: () => Options<CallToTestOrderOfParamsData, ThrowOnError> | undefined) => { 619 - return httpResource<unknown>(() => { 620 - const opts = options ? options() : undefined; 621 - return opts ? callToTestOrderOfParamsRequest(opts) : undefined; 622 - }); 623 - }; 474 + export const callToTestOrderOfParamsResource = <ThrowOnError extends boolean = false>(options: () => Options<CallToTestOrderOfParamsData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 475 + const opts = options ? options() : undefined; 476 + return opts ? callToTestOrderOfParamsRequest(opts) : undefined; 477 + }); 624 478 625 - export const duplicateNameResource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) => { 626 - return httpResource<unknown>(() => { 627 - const opts = options ? options() : undefined; 628 - return opts ? duplicateNameRequest(opts) : undefined; 629 - }); 630 - }; 479 + export const duplicateNameResource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateNameData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 480 + const opts = options ? options() : undefined; 481 + return opts ? duplicateNameRequest(opts) : undefined; 482 + }); 631 483 632 - export const duplicateName2Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName2Data, ThrowOnError> | undefined) => { 633 - return httpResource<unknown>(() => { 634 - const opts = options ? options() : undefined; 635 - return opts ? duplicateName2Request(opts) : undefined; 636 - }); 637 - }; 484 + export const duplicateName2Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName2Data, ThrowOnError> | undefined) => httpResource<unknown>(() => { 485 + const opts = options ? options() : undefined; 486 + return opts ? duplicateName2Request(opts) : undefined; 487 + }); 638 488 639 - export const duplicateName3Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName3Data, ThrowOnError> | undefined) => { 640 - return httpResource<unknown>(() => { 641 - const opts = options ? options() : undefined; 642 - return opts ? duplicateName3Request(opts) : undefined; 643 - }); 644 - }; 489 + export const duplicateName3Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName3Data, ThrowOnError> | undefined) => httpResource<unknown>(() => { 490 + const opts = options ? options() : undefined; 491 + return opts ? duplicateName3Request(opts) : undefined; 492 + }); 645 493 646 - export const duplicateName4Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName4Data, ThrowOnError> | undefined) => { 647 - return httpResource<unknown>(() => { 648 - const opts = options ? options() : undefined; 649 - return opts ? duplicateName4Request(opts) : undefined; 650 - }); 651 - }; 494 + export const duplicateName4Resource = <ThrowOnError extends boolean = false>(options?: () => Options<DuplicateName4Data, ThrowOnError> | undefined) => httpResource<unknown>(() => { 495 + const opts = options ? options() : undefined; 496 + return opts ? duplicateName4Request(opts) : undefined; 497 + }); 652 498 653 - export const callWithNoContentResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithNoContentResponseData, ThrowOnError> | undefined) => { 654 - return httpResource<CallWithNoContentResponseResponse>(() => { 655 - const opts = options ? options() : undefined; 656 - return opts ? callWithNoContentResponseRequest(opts) : undefined; 657 - }); 658 - }; 499 + export const callWithNoContentResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithNoContentResponseData, ThrowOnError> | undefined) => httpResource<CallWithNoContentResponseResponse>(() => { 500 + const opts = options ? options() : undefined; 501 + return opts ? callWithNoContentResponseRequest(opts) : undefined; 502 + }); 659 503 660 - export const callWithResponseAndNoContentResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) => { 661 - return httpResource<CallWithResponseAndNoContentResponseResponse>(() => { 662 - const opts = options ? options() : undefined; 663 - return opts ? callWithResponseAndNoContentResponseRequest(opts) : undefined; 664 - }); 665 - }; 504 + export const callWithResponseAndNoContentResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseAndNoContentResponseData, ThrowOnError> | undefined) => httpResource<CallWithResponseAndNoContentResponseResponse>(() => { 505 + const opts = options ? options() : undefined; 506 + return opts ? callWithResponseAndNoContentResponseRequest(opts) : undefined; 507 + }); 666 508 667 - export const dummyAResource = <ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) => { 668 - return httpResource<DummyAResponse>(() => { 669 - const opts = options ? options() : undefined; 670 - return opts ? dummyARequest(opts) : undefined; 671 - }); 672 - }; 509 + export const dummyAResource = <ThrowOnError extends boolean = false>(options?: () => Options<DummyAData, ThrowOnError> | undefined) => httpResource<DummyAResponse>(() => { 510 + const opts = options ? options() : undefined; 511 + return opts ? dummyARequest(opts) : undefined; 512 + }); 673 513 674 - export const dummyBResource = <ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) => { 675 - return httpResource<DummyBResponse>(() => { 676 - const opts = options ? options() : undefined; 677 - return opts ? dummyBRequest(opts) : undefined; 678 - }); 679 - }; 514 + export const dummyBResource = <ThrowOnError extends boolean = false>(options?: () => Options<DummyBData, ThrowOnError> | undefined) => httpResource<DummyBResponse>(() => { 515 + const opts = options ? options() : undefined; 516 + return opts ? dummyBRequest(opts) : undefined; 517 + }); 680 518 681 - export const callWithResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseData, ThrowOnError> | undefined) => { 682 - return httpResource<CallWithResponseResponse>(() => { 683 - const opts = options ? options() : undefined; 684 - return opts ? callWithResponseRequest(opts) : undefined; 685 - }); 686 - }; 519 + export const callWithResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponseData, ThrowOnError> | undefined) => httpResource<CallWithResponseResponse>(() => { 520 + const opts = options ? options() : undefined; 521 + return opts ? callWithResponseRequest(opts) : undefined; 522 + }); 687 523 688 - export const callWithDuplicateResponsesResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDuplicateResponsesData, ThrowOnError> | undefined) => { 689 - return httpResource<CallWithDuplicateResponsesResponse>(() => { 690 - const opts = options ? options() : undefined; 691 - return opts ? callWithDuplicateResponsesRequest(opts) : undefined; 692 - }); 693 - }; 524 + export const callWithDuplicateResponsesResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithDuplicateResponsesData, ThrowOnError> | undefined) => httpResource<CallWithDuplicateResponsesResponse>(() => { 525 + const opts = options ? options() : undefined; 526 + return opts ? callWithDuplicateResponsesRequest(opts) : undefined; 527 + }); 694 528 695 - export const callWithResponsesResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponsesData, ThrowOnError> | undefined) => { 696 - return httpResource<CallWithResponsesResponse>(() => { 697 - const opts = options ? options() : undefined; 698 - return opts ? callWithResponsesRequest(opts) : undefined; 699 - }); 700 - }; 529 + export const callWithResponsesResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResponsesData, ThrowOnError> | undefined) => httpResource<CallWithResponsesResponse>(() => { 530 + const opts = options ? options() : undefined; 531 + return opts ? callWithResponsesRequest(opts) : undefined; 532 + }); 701 533 702 - export const collectionFormatResource = <ThrowOnError extends boolean = false>(options: () => Options<CollectionFormatData, ThrowOnError> | undefined) => { 703 - return httpResource<unknown>(() => { 704 - const opts = options ? options() : undefined; 705 - return opts ? collectionFormatRequest(opts) : undefined; 706 - }); 707 - }; 534 + export const collectionFormatResource = <ThrowOnError extends boolean = false>(options: () => Options<CollectionFormatData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 535 + const opts = options ? options() : undefined; 536 + return opts ? collectionFormatRequest(opts) : undefined; 537 + }); 708 538 709 - export const typesResource = <ThrowOnError extends boolean = false>(options: () => Options<TypesData, ThrowOnError> | undefined) => { 710 - return httpResource<TypesResponse>(() => { 711 - const opts = options ? options() : undefined; 712 - return opts ? typesRequest(opts) : undefined; 713 - }); 714 - }; 539 + export const typesResource = <ThrowOnError extends boolean = false>(options: () => Options<TypesData, ThrowOnError> | undefined) => httpResource<TypesResponse>(() => { 540 + const opts = options ? options() : undefined; 541 + return opts ? typesRequest(opts) : undefined; 542 + }); 715 543 716 - export const uploadFileResource = <ThrowOnError extends boolean = false>(options: () => Options<UploadFileData, ThrowOnError> | undefined) => { 717 - return httpResource<UploadFileResponse>(() => { 718 - const opts = options ? options() : undefined; 719 - return opts ? uploadFileRequest(opts) : undefined; 720 - }); 721 - }; 544 + export const uploadFileResource = <ThrowOnError extends boolean = false>(options: () => Options<UploadFileData, ThrowOnError> | undefined) => httpResource<UploadFileResponse>(() => { 545 + const opts = options ? options() : undefined; 546 + return opts ? uploadFileRequest(opts) : undefined; 547 + }); 722 548 723 - export const fileResponseResource = <ThrowOnError extends boolean = false>(options: () => Options<FileResponseData, ThrowOnError> | undefined) => { 724 - return httpResource<FileResponseResponse>(() => { 725 - const opts = options ? options() : undefined; 726 - return opts ? fileResponseRequest(opts) : undefined; 727 - }); 728 - }; 549 + export const fileResponseResource = <ThrowOnError extends boolean = false>(options: () => Options<FileResponseData, ThrowOnError> | undefined) => httpResource<FileResponseResponse>(() => { 550 + const opts = options ? options() : undefined; 551 + return opts ? fileResponseRequest(opts) : undefined; 552 + }); 729 553 730 - export const complexTypesResource = <ThrowOnError extends boolean = false>(options: () => Options<ComplexTypesData, ThrowOnError> | undefined) => { 731 - return httpResource<ComplexTypesResponse>(() => { 732 - const opts = options ? options() : undefined; 733 - return opts ? complexTypesRequest(opts) : undefined; 734 - }); 735 - }; 554 + export const complexTypesResource = <ThrowOnError extends boolean = false>(options: () => Options<ComplexTypesData, ThrowOnError> | undefined) => httpResource<ComplexTypesResponse>(() => { 555 + const opts = options ? options() : undefined; 556 + return opts ? complexTypesRequest(opts) : undefined; 557 + }); 736 558 737 - export const multipartResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<MultipartResponseData, ThrowOnError> | undefined) => { 738 - return httpResource<MultipartResponseResponse>(() => { 739 - const opts = options ? options() : undefined; 740 - return opts ? multipartResponseRequest(opts) : undefined; 741 - }); 742 - }; 559 + export const multipartResponseResource = <ThrowOnError extends boolean = false>(options?: () => Options<MultipartResponseData, ThrowOnError> | undefined) => httpResource<MultipartResponseResponse>(() => { 560 + const opts = options ? options() : undefined; 561 + return opts ? multipartResponseRequest(opts) : undefined; 562 + }); 743 563 744 - export const multipartRequestResource = <ThrowOnError extends boolean = false>(options?: () => Options<MultipartRequestData, ThrowOnError> | undefined) => { 745 - return httpResource<unknown>(() => { 746 - const opts = options ? options() : undefined; 747 - return opts ? multipartRequestRequest(opts) : undefined; 748 - }); 749 - }; 564 + export const multipartRequestResource = <ThrowOnError extends boolean = false>(options?: () => Options<MultipartRequestData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 565 + const opts = options ? options() : undefined; 566 + return opts ? multipartRequestRequest(opts) : undefined; 567 + }); 750 568 751 - export const complexParamsResource = <ThrowOnError extends boolean = false>(options: () => Options<ComplexParamsData, ThrowOnError> | undefined) => { 752 - return httpResource<ComplexParamsResponse>(() => { 753 - const opts = options ? options() : undefined; 754 - return opts ? complexParamsRequest(opts) : undefined; 755 - }); 756 - }; 569 + export const complexParamsResource = <ThrowOnError extends boolean = false>(options: () => Options<ComplexParamsData, ThrowOnError> | undefined) => httpResource<ComplexParamsResponse>(() => { 570 + const opts = options ? options() : undefined; 571 + return opts ? complexParamsRequest(opts) : undefined; 572 + }); 757 573 758 - export const callWithResultFromHeaderResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResultFromHeaderData, ThrowOnError> | undefined) => { 759 - return httpResource<unknown>(() => { 760 - const opts = options ? options() : undefined; 761 - return opts ? callWithResultFromHeaderRequest(opts) : undefined; 762 - }); 763 - }; 574 + export const callWithResultFromHeaderResource = <ThrowOnError extends boolean = false>(options?: () => Options<CallWithResultFromHeaderData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 575 + const opts = options ? options() : undefined; 576 + return opts ? callWithResultFromHeaderRequest(opts) : undefined; 577 + }); 764 578 765 - export const testErrorCodeResource = <ThrowOnError extends boolean = false>(options: () => Options<TestErrorCodeData, ThrowOnError> | undefined) => { 766 - return httpResource<unknown>(() => { 767 - const opts = options ? options() : undefined; 768 - return opts ? testErrorCodeRequest(opts) : undefined; 769 - }); 770 - }; 579 + export const testErrorCodeResource = <ThrowOnError extends boolean = false>(options: () => Options<TestErrorCodeData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 580 + const opts = options ? options() : undefined; 581 + return opts ? testErrorCodeRequest(opts) : undefined; 582 + }); 771 583 772 - export const nonAsciiæøåÆøÅöôêÊ字符串Resource = <ThrowOnError extends boolean = false>(options: () => Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError> | undefined) => { 773 - return httpResource<NonAsciiæøåÆøÅöôêÊ字符串Response>(() => { 774 - const opts = options ? options() : undefined; 775 - return opts ? nonAsciiæøåÆøÅöôêÊ字符串Request(opts) : undefined; 776 - }); 777 - }; 584 + export const nonAsciiæøåÆøÅöôêÊ字符串Resource = <ThrowOnError extends boolean = false>(options: () => Options<NonAsciiæøåÆøÅöôêÊ字符串Data, ThrowOnError> | undefined) => httpResource<NonAsciiæøåÆøÅöôêÊ字符串Response>(() => { 585 + const opts = options ? options() : undefined; 586 + return opts ? nonAsciiæøåÆøÅöôêÊ字符串Request(opts) : undefined; 587 + }); 778 588 779 589 /** 780 590 * Login User 781 591 */ 782 - export const putWithFormUrlEncodedResource = <ThrowOnError extends boolean = false>(options: () => Options<PutWithFormUrlEncodedData, ThrowOnError> | undefined) => { 783 - return httpResource<unknown>(() => { 784 - const opts = options ? options() : undefined; 785 - return opts ? putWithFormUrlEncodedRequest(opts) : undefined; 786 - }); 787 - }; 592 + export const putWithFormUrlEncodedResource = <ThrowOnError extends boolean = false>(options: () => Options<PutWithFormUrlEncodedData, ThrowOnError> | undefined) => httpResource<unknown>(() => { 593 + const opts = options ? options() : undefined; 594 + return opts ? putWithFormUrlEncodedRequest(opts) : undefined; 595 + });
+77 -133
packages/openapi-ts/src/plugins/@angular/common/httpRequests.ts
··· 1 1 import type { Symbol } from '@hey-api/codegen-core'; 2 - import type ts from 'typescript'; 3 2 4 3 import type { IR } from '~/ir/types'; 5 4 import { buildName } from '~/openApi/shared/utils/name'; ··· 8 7 createOperationComment, 9 8 isOperationOptionsRequired, 10 9 } from '~/plugins/shared/utils/operation'; 11 - import { tsc } from '~/tsc'; 10 + import { $ } from '~/ts-dsl'; 12 11 import { stringCase } from '~/utils/stringCase'; 13 12 14 13 import type { AngularCommonPlugin } from './types'; ··· 17 16 className: string; 18 17 classes: Set<string>; 19 18 methods: Set<string>; 20 - nodes: Array<ts.ClassElement>; 19 + nodes: Array<ReturnType<typeof $.method | typeof $.field | typeof $.newline>>; 21 20 root: boolean; 22 21 } 23 22 ··· 88 87 if (!currentClass.nodes.length) { 89 88 currentClass.nodes.push(methodNode); 90 89 } else { 91 - // @ts-expect-error 92 - currentClass.nodes.push(tsc.identifier({ text: '\n' }), methodNode); 90 + currentClass.nodes.push($.newline(), methodNode); 93 91 } 94 92 95 93 currentClass.methods.add(requestMethodName); ··· 113 111 generateClass(childClass); 114 112 115 113 currentClass.nodes.push( 116 - tsc.propertyDeclaration({ 117 - initializer: tsc.newExpression({ 118 - argumentsArray: [], 119 - expression: tsc.identifier({ 120 - text: buildName({ 121 - config: { 122 - case: 'preserve', 123 - name: plugin.config.httpRequests.classNameBuilder, 124 - }, 125 - name: childClass.className, 126 - }), 114 + $.field( 115 + stringCase({ case: 'camelCase', value: childClass.className }), 116 + ).assign( 117 + $.new( 118 + buildName({ 119 + config: { 120 + case: 'preserve', 121 + name: plugin.config.httpRequests.classNameBuilder, 122 + }, 123 + name: childClass.className, 127 124 }), 128 - }), 129 - name: stringCase({ 130 - case: 'camelCase', 131 - value: childClass.className, 132 - }), 133 - }), 125 + ), 126 + ), 134 127 ); 135 128 } 136 129 } ··· 155 148 name: currentClass.className, 156 149 }), 157 150 }); 158 - const node = tsc.classDeclaration({ 159 - decorator: currentClass.root 160 - ? { 161 - args: [{ providedIn: 'root' }], 162 - name: symbolInjectable.placeholder, 163 - } 164 - : undefined, 165 - exportClass: symbolClass.exported, 166 - name: symbolClass.placeholder, 167 - nodes: currentClass.nodes, 168 - }); 151 + const node = $.class(symbolClass.placeholder) 152 + .export(symbolClass.exported) 153 + .$if(currentClass.root, (c) => 154 + c.decorator( 155 + symbolInjectable.placeholder, 156 + $.object().prop('providedIn', $.literal('root')), 157 + ), 158 + ) 159 + .do(...currentClass.nodes); 169 160 plugin.setSymbolValue(symbolClass, node); 170 161 171 162 generatedClasses.add(currentClass.className); ··· 225 216 category: 'client', 226 217 }); 227 218 228 - const optionsClient = tsc.propertyAccessExpression({ 229 - expression: tsc.identifier({ text: 'options' }), 230 - isOptional: true, 231 - name: 'client', 232 - }); 233 - 234 - let clientExpression: ts.Expression; 235 - if (symbolClient) { 236 - clientExpression = tsc.binaryExpression({ 237 - left: optionsClient, 238 - operator: '??', 239 - right: symbolClient.placeholder, 240 - }); 241 - } else { 242 - clientExpression = optionsClient; 243 - } 219 + const optionsClient = $('options') 220 + .attr('client') 221 + .optional() 222 + .$if(symbolClient, (c, s) => c.coalesce(s.placeholder)); 244 223 245 - return tsc.callExpression({ 246 - functionName: tsc.propertyAccessExpression({ 247 - expression: clientExpression, 248 - name: 'requestOptions', 249 - }), 250 - parameters: [ 251 - tsc.objectExpression({ 252 - obj: [ 253 - { 254 - key: 'responseStyle', 255 - value: tsc.identifier({ text: "'data'" }), 256 - }, 257 - { 258 - key: 'method', 259 - value: tsc.identifier({ 260 - text: `'${operation.method.toUpperCase()}'`, 261 - }), 262 - }, 263 - { 264 - key: 'url', 265 - value: tsc.identifier({ text: `'${operation.path}'` }), 266 - }, 267 - { 268 - spread: 'options', 269 - }, 270 - ], 271 - }), 272 - ], 273 - }); 224 + return optionsClient 225 + .attr('requestOptions') 226 + .call( 227 + $.object() 228 + .prop('responseStyle', $.literal('data')) 229 + .prop('method', $.literal(operation.method.toUpperCase())) 230 + .prop('url', $.literal(operation.path)) 231 + .spread('options'), 232 + ); 274 233 }; 275 234 276 235 const generateAngularRequestMethod = ({ ··· 304 263 }); 305 264 const dataType = symbolDataType?.placeholder || 'unknown'; 306 265 307 - return tsc.methodDeclaration({ 308 - accessLevel: 'public', 309 - comment: createOperationComment({ operation }), 310 - name: methodName, 311 - parameters: [ 312 - { 313 - isRequired: isRequiredOptions, 314 - name: 'options', 315 - type: `${symbolOptions.placeholder}<${dataType}, ThrowOnError>`, 316 - }, 317 - ], 318 - returnType: `${symbolHttpRequest.placeholder}<unknown>`, 319 - statements: [ 320 - tsc.returnStatement({ 321 - expression: generateRequestCallExpression({ 266 + return $.method(methodName) 267 + .public() 268 + .$if(createOperationComment({ operation }), (c, v) => 269 + c.doc(v as ReadonlyArray<string>), 270 + ) 271 + .param('options', (p) => 272 + p 273 + .optional(!isRequiredOptions) 274 + .type(`${symbolOptions.placeholder}<${dataType}, ThrowOnError>`), 275 + ) 276 + .generic('ThrowOnError', (g) => g.extends('boolean').default(false)) 277 + .returns(`${symbolHttpRequest.placeholder}<unknown>`) 278 + .do( 279 + $.return( 280 + generateRequestCallExpression({ 322 281 operation, 323 282 plugin, 324 283 }), 325 - }), 326 - ], 327 - types: [ 328 - { 329 - default: false, 330 - extends: 'boolean', 331 - name: 'ThrowOnError', 332 - }, 333 - ], 334 - }); 284 + ), 285 + ); 335 286 }; 336 287 337 288 const generateAngularRequestFunction = ({ ··· 365 316 }); 366 317 const dataType = symbolDataType?.placeholder || 'unknown'; 367 318 368 - return tsc.constVariable({ 369 - comment: createOperationComment({ operation }), 370 - exportConst: symbol.exported, 371 - expression: tsc.arrowFunction({ 372 - parameters: [ 373 - { 374 - isRequired: isRequiredOptions, 375 - name: 'options', 376 - type: `${symbolOptions.placeholder}<${dataType}, ThrowOnError>`, 377 - }, 378 - ], 379 - returnType: `${symbolHttpRequest.placeholder}<unknown>`, 380 - statements: [ 381 - tsc.returnStatement({ 382 - expression: generateRequestCallExpression({ 383 - operation, 384 - plugin, 385 - }), 386 - }), 387 - ], 388 - types: [ 389 - { 390 - default: false, 391 - extends: 'boolean', 392 - name: 'ThrowOnError', 393 - }, 394 - ], 395 - }), 396 - name: symbol.placeholder, 397 - }); 319 + return $.const(symbol.placeholder) 320 + .export(symbol.exported) 321 + .$if(createOperationComment({ operation }), (c, v) => 322 + c.doc(v as ReadonlyArray<string>), 323 + ) 324 + .assign( 325 + $.func() 326 + .param('options', (p) => 327 + p 328 + .optional(!isRequiredOptions) 329 + .type(`${symbolOptions.placeholder}<${dataType}, ThrowOnError>`), 330 + ) 331 + .generic('ThrowOnError', (g) => g.extends('boolean').default(false)) 332 + .returns(`${symbolHttpRequest.placeholder}<unknown>`) 333 + .do( 334 + $.return( 335 + generateRequestCallExpression({ 336 + operation, 337 + plugin, 338 + }), 339 + ), 340 + ), 341 + ); 398 342 }; 399 343 400 344 export const createHttpRequests: AngularCommonPlugin['Handler'] = ({
+113 -175
packages/openapi-ts/src/plugins/@angular/common/httpResources.ts
··· 1 1 import type { Symbol } from '@hey-api/codegen-core'; 2 - import type ts from 'typescript'; 3 2 4 3 import type { IR } from '~/ir/types'; 5 4 import { buildName } from '~/openApi/shared/utils/name'; ··· 8 7 createOperationComment, 9 8 isOperationOptionsRequired, 10 9 } from '~/plugins/shared/utils/operation'; 11 - import { tsc } from '~/tsc'; 10 + import { $ } from '~/ts-dsl'; 12 11 import { stringCase } from '~/utils/stringCase'; 13 12 14 13 import type { AngularCommonPlugin } from './types'; ··· 17 16 className: string; 18 17 classes: Set<string>; 19 18 methods: Set<string>; 20 - nodes: Array<ts.ClassElement>; 19 + nodes: Array<ReturnType<typeof $.method | typeof $.field | typeof $.newline>>; 21 20 root: boolean; 22 21 } 23 22 ··· 88 87 if (!currentClass.nodes.length) { 89 88 currentClass.nodes.push(methodNode); 90 89 } else { 91 - // @ts-expect-error 92 - currentClass.nodes.push(tsc.identifier({ text: '\n' }), methodNode); 90 + currentClass.nodes.push($.newline(), methodNode); 93 91 } 94 92 95 93 currentClass.methods.add(resourceMethodName); ··· 113 111 generateClass(childClass); 114 112 115 113 currentClass.nodes.push( 116 - tsc.propertyDeclaration({ 117 - initializer: tsc.newExpression({ 118 - argumentsArray: [], 119 - expression: tsc.identifier({ 120 - text: buildName({ 121 - config: { 122 - case: 'preserve', 123 - name: plugin.config.httpResources.classNameBuilder, 124 - }, 125 - name: childClass.className, 126 - }), 127 - }), 128 - }), 129 - name: stringCase({ 114 + $.field( 115 + stringCase({ 130 116 case: 'camelCase', 131 117 value: childClass.className, 132 118 }), 133 - }), 119 + ).assign( 120 + $.new( 121 + buildName({ 122 + config: { 123 + case: 'preserve', 124 + name: plugin.config.httpResources.classNameBuilder, 125 + }, 126 + name: childClass.className, 127 + }), 128 + ), 129 + ), 134 130 ); 135 131 } 136 132 } ··· 149 145 name: currentClass.className, 150 146 }), 151 147 }); 152 - const node = tsc.classDeclaration({ 153 - decorator: currentClass.root 154 - ? { 155 - args: [{ providedIn: 'root' }], 156 - name: symbolInjectable.placeholder, 157 - } 158 - : undefined, 159 - exportClass: symbolClass.exported, 160 - name: symbolClass.placeholder, 161 - nodes: currentClass.nodes, 162 - }); 148 + const node = $.class(symbolClass.placeholder) 149 + .export(symbolClass.exported) 150 + .$if(currentClass.root, (c) => 151 + c.decorator( 152 + symbolInjectable.placeholder, 153 + $.object().prop('providedIn', $.literal('root')), 154 + ), 155 + ) 156 + .do(...currentClass.nodes); 163 157 plugin.setSymbolValue(symbolClass, node); 164 158 165 159 generatedClasses.add(currentClass.className); ··· 247 241 category: 'external', 248 242 resource: '@angular/core.inject', 249 243 }); 250 - let methodAccess: ts.Expression = tsc.callExpression({ 251 - functionName: symbolInject.placeholder, 252 - parameters: [tsc.identifier({ text: symbolClass.placeholder })], 253 - }); 244 + let methodAccess: ReturnType<typeof $.attr | typeof $.call> = $( 245 + symbolInject.placeholder, 246 + ).call(symbolClass.placeholder); 254 247 255 248 // Navigate through the class hierarchy 256 249 for (let i = 1; i < firstEntry.path.length; i++) { 257 250 const className = firstEntry.path[i]; 258 251 if (className) { 259 - methodAccess = tsc.propertyAccessExpression({ 260 - expression: methodAccess, 261 - name: stringCase({ 252 + methodAccess = methodAccess.attr( 253 + stringCase({ 262 254 case: 'camelCase', 263 255 value: className, 264 256 }), 265 - }); 257 + ); 266 258 } 267 259 } 268 260 269 - methodAccess = tsc.propertyAccessExpression({ 270 - expression: methodAccess, 271 - name: plugin.config.httpRequests.methodNameBuilder(operation), 272 - }); 261 + methodAccess = methodAccess.attr( 262 + plugin.config.httpRequests.methodNameBuilder(operation), 263 + ); 273 264 274 - return tsc.callExpression({ 275 - functionName: symbolHttpResource.placeholder, 276 - parameters: [ 277 - tsc.arrowFunction({ 278 - parameters: [], 279 - statements: [ 280 - tsc.constVariable({ 281 - expression: tsc.conditionalExpression({ 282 - condition: tsc.identifier({ text: 'options' }), 283 - whenFalse: tsc.identifier({ text: 'undefined' }), 284 - whenTrue: tsc.callExpression({ 285 - functionName: 'options', 286 - parameters: [], 287 - }), 288 - }), 289 - name: 'opts', 290 - }), 291 - tsc.returnStatement({ 292 - expression: tsc.conditionalExpression({ 293 - condition: tsc.identifier({ text: 'opts' }), 294 - whenFalse: tsc.identifier({ text: 'undefined' }), 295 - whenTrue: tsc.callExpression({ 296 - functionName: methodAccess, 297 - parameters: [tsc.identifier({ text: 'opts' })], 298 - }), 299 - }), 300 - }), 301 - ], 302 - }), 303 - ], 304 - types: [tsc.typeNode(responseType)], 305 - }); 265 + return $(symbolHttpResource.placeholder) 266 + .call( 267 + $.func().do( 268 + $.const('opts').assign( 269 + $.ternary('options') 270 + .do($('options').call()) 271 + .otherwise($.id('undefined')), 272 + ), 273 + $.return( 274 + $.ternary('opts') 275 + .do(methodAccess.call('opts')) 276 + .otherwise($.id('undefined')), 277 + ), 278 + ), 279 + ) 280 + .generic(responseType); 306 281 } 307 282 } else { 308 283 const symbolHttpRequest = plugin.referenceSymbol({ ··· 313 288 tool: 'angular', 314 289 }); 315 290 316 - return tsc.callExpression({ 317 - functionName: symbolHttpResource.placeholder, 318 - parameters: [ 319 - tsc.arrowFunction({ 320 - parameters: [], 321 - statements: [ 322 - tsc.constVariable({ 323 - expression: tsc.conditionalExpression({ 324 - condition: tsc.identifier({ text: 'options' }), 325 - whenFalse: tsc.identifier({ text: 'undefined' }), 326 - whenTrue: tsc.callExpression({ 327 - functionName: 'options', 328 - parameters: [], 329 - }), 330 - }), 331 - name: 'opts', 332 - }), 333 - tsc.returnStatement({ 334 - expression: tsc.conditionalExpression({ 335 - condition: tsc.identifier({ text: 'opts' }), 336 - whenFalse: tsc.identifier({ text: 'undefined' }), 337 - whenTrue: tsc.callExpression({ 338 - functionName: symbolHttpRequest.placeholder, 339 - parameters: [tsc.identifier({ text: 'opts' })], 340 - }), 341 - }), 342 - }), 343 - ], 344 - }), 345 - ], 346 - types: [tsc.typeNode(responseType)], 347 - }); 291 + return $(symbolHttpResource.placeholder) 292 + .call( 293 + $.func().do( 294 + $.const('opts').assign( 295 + $.ternary('options') 296 + .do($('options').call()) 297 + .otherwise($.id('undefined')), 298 + ), 299 + $.return( 300 + $.ternary('opts') 301 + .do($(symbolHttpRequest.placeholder).call('opts')) 302 + .otherwise($.id('undefined')), 303 + ), 304 + ), 305 + ) 306 + .generic(responseType); 348 307 } 349 308 350 309 // Fallback return (should not reach here) 351 - return tsc.callExpression({ 352 - functionName: symbolHttpResource.placeholder, 353 - parameters: [ 354 - tsc.arrowFunction({ 355 - parameters: [], 356 - statements: [ 357 - tsc.returnStatement({ 358 - expression: tsc.identifier({ text: 'undefined' }), 359 - }), 360 - ], 361 - }), 362 - ], 363 - types: [tsc.typeNode(responseType)], 364 - }); 310 + return $(symbolHttpResource.placeholder).call( 311 + $.func() 312 + .do($.return($.id('undefined'))) 313 + .generic(responseType), 314 + ); 365 315 }; 366 316 367 317 const generateAngularResourceMethod = ({ ··· 390 340 }); 391 341 const dataType = symbolDataType?.placeholder || 'unknown'; 392 342 393 - return tsc.methodDeclaration({ 394 - accessLevel: 'public', 395 - comment: createOperationComment({ operation }), 396 - name: methodName, 397 - parameters: [ 398 - { 399 - isRequired: isRequiredOptions, 400 - name: 'options', 401 - type: `() => ${symbolOptions.placeholder}<${dataType}, ThrowOnError> | undefined`, 402 - }, 403 - ], 404 - returnType: undefined, 405 - statements: [ 406 - tsc.returnStatement({ 407 - expression: generateResourceCallExpression({ 343 + return $.method(methodName) 344 + .public() 345 + .$if(createOperationComment({ operation }), (c, v) => 346 + c.doc(v as ReadonlyArray<string>), 347 + ) 348 + .param('options', (p) => 349 + p 350 + .optional(!isRequiredOptions) 351 + .type( 352 + `() => ${symbolOptions.placeholder}<${dataType}, ThrowOnError> | undefined`, 353 + ), 354 + ) 355 + .generic('ThrowOnError', (g) => g.extends('boolean').default(false)) 356 + .do( 357 + $.return( 358 + generateResourceCallExpression({ 408 359 operation, 409 360 plugin, 410 361 }), 411 - }), 412 - ], 413 - types: [ 414 - { 415 - default: false, 416 - extends: 'boolean', 417 - name: 'ThrowOnError', 418 - }, 419 - ], 420 - }); 362 + ), 363 + ); 421 364 }; 422 365 423 366 const generateAngularResourceFunction = ({ ··· 446 389 }); 447 390 const dataType = symbolDataType?.placeholder || 'unknown'; 448 391 449 - return tsc.constVariable({ 450 - comment: createOperationComment({ operation }), 451 - exportConst: symbol.exported, 452 - expression: tsc.arrowFunction({ 453 - parameters: [ 454 - { 455 - isRequired: isRequiredOptions, 456 - name: 'options', 457 - type: `() => ${symbolOptions.placeholder}<${dataType}, ThrowOnError> | undefined`, 458 - }, 459 - ], 460 - statements: [ 461 - tsc.returnStatement({ 462 - expression: generateResourceCallExpression({ 463 - operation, 464 - plugin, 465 - }), 466 - }), 467 - ], 468 - types: [ 469 - { 470 - default: false, 471 - extends: 'boolean', 472 - name: 'ThrowOnError', 473 - }, 474 - ], 475 - }), 476 - name: symbol.placeholder, 477 - }); 392 + return $.const(symbol.placeholder) 393 + .export(symbol.exported) 394 + .$if(createOperationComment({ operation }), (c, v) => 395 + c.doc(v as ReadonlyArray<string>), 396 + ) 397 + .assign( 398 + $.func() 399 + .param('options', (p) => 400 + p 401 + .optional(!isRequiredOptions) 402 + .type( 403 + `() => ${symbolOptions.placeholder}<${dataType}, ThrowOnError> | undefined`, 404 + ), 405 + ) 406 + .generic('ThrowOnError', (g) => g.extends('boolean').default(false)) 407 + .do( 408 + $.return( 409 + generateResourceCallExpression({ 410 + operation, 411 + plugin, 412 + }), 413 + ), 414 + ), 415 + ); 478 416 }; 479 417 480 418 export const createHttpResources: AngularCommonPlugin['Handler'] = ({
+3 -5
packages/openapi-ts/src/plugins/@pinia/colada/meta.ts
··· 1 - import type ts from 'typescript'; 2 - 3 1 import type { IR } from '~/ir/types'; 4 - import { tsc } from '~/tsc'; 2 + import { $ } from '~/ts-dsl'; 5 3 6 4 import type { PiniaColadaPlugin } from './types'; 7 5 ··· 9 7 plugin: PiniaColadaPlugin['Instance'], 10 8 operation: IR.OperationObject, 11 9 configPath: 'queryOptions' | 'mutationOptions', 12 - ): ts.Expression | undefined => { 10 + ): ReturnType<typeof $.fromValue> | undefined => { 13 11 const metaFn = plugin.config[configPath].meta; 14 12 if (!metaFn) return; 15 13 16 14 const metaObject = metaFn(operation); 17 15 if (!Object.keys(metaObject).length) return; 18 16 19 - return tsc.valueToExpression({ value: metaObject }); 17 + return $.fromValue(metaObject); 20 18 };
+1 -1
packages/openapi-ts/src/plugins/@pinia/colada/mutationOptions.ts
··· 106 106 if (meta) { 107 107 mutationOptionsObj.push({ 108 108 key: 'meta', 109 - value: meta, 109 + value: meta.$render(), 110 110 }); 111 111 } 112 112
+1 -1
packages/openapi-ts/src/plugins/@pinia/colada/queryOptions.ts
··· 153 153 if (meta) { 154 154 queryOptionsObj.push({ 155 155 key: 'meta', 156 - value: meta, 156 + value: meta.$render(), 157 157 }); 158 158 } 159 159
+2 -1
packages/openapi-ts/src/ts-dsl/decl/pattern.ts
··· 2 2 3 3 import type { MaybeArray } from '../base'; 4 4 import { TsDsl } from '../base'; 5 + import { IdTsDsl } from '../expr/id'; 5 6 import { TokenTsDsl } from '../token'; 6 7 7 8 /** ··· 83 84 ? ts.factory.createBindingElement( 84 85 this.$node(new TokenTsDsl().spread()), 85 86 undefined, 86 - ts.factory.createIdentifier(this._spread), 87 + this.$node(new IdTsDsl(this._spread)), 87 88 ) 88 89 : undefined; 89 90 }
+16
packages/openapi-ts/src/ts-dsl/expr/id.ts
··· 1 + import ts from 'typescript'; 2 + 3 + import { TsDsl } from '../base'; 4 + 5 + export class IdTsDsl extends TsDsl<ts.Identifier> { 6 + protected name: string; 7 + 8 + constructor(name: string) { 9 + super(); 10 + this.name = name; 11 + } 12 + 13 + $render(): ts.Identifier { 14 + return ts.factory.createIdentifier(this.name); 15 + } 16 + }
+4
packages/openapi-ts/src/ts-dsl/index.ts
··· 18 18 import { CallTsDsl } from './expr/call'; 19 19 import { ExprTsDsl } from './expr/expr'; 20 20 import { fromValue as exprValue } from './expr/fromValue'; 21 + import { IdTsDsl } from './expr/id'; 21 22 import { LiteralTsDsl } from './expr/literal'; 22 23 import { NewTsDsl } from './expr/new'; 23 24 import { ObjectTsDsl } from './expr/object'; ··· 133 134 /** Creates a single-line comment (//). */ 134 135 hint: (...args: ConstructorParameters<typeof HintTsDsl>) => 135 136 new HintTsDsl(...args), 137 + 138 + /** Creates an identifier (e.g. `foo`). */ 139 + id: (...args: ConstructorParameters<typeof IdTsDsl>) => new IdTsDsl(...args), 136 140 137 141 /** Creates an if statement. */ 138 142 if: (...args: ConstructorParameters<typeof IfTsDsl>) => new IfTsDsl(...args),
+2 -1
packages/openapi-ts/src/ts-dsl/layout/doc.ts
··· 2 2 3 3 import type { MaybeArray } from '../base'; 4 4 import { TsDsl } from '../base'; 5 + import { IdTsDsl } from '../expr/id'; 5 6 6 7 export class DocTsDsl extends TsDsl<ts.Node> { 7 8 protected _lines: Array<string> = []; ··· 61 62 // this class does not build a standalone node; 62 63 // it modifies other nodes via `apply()`. 63 64 // Return a dummy comment node for compliance. 64 - return ts.factory.createIdentifier(''); 65 + return this.$node(new IdTsDsl('')); 65 66 } 66 67 }
+2 -1
packages/openapi-ts/src/ts-dsl/layout/hint.ts
··· 2 2 3 3 import type { MaybeArray } from '../base'; 4 4 import { TsDsl } from '../base'; 5 + import { IdTsDsl } from '../expr/id'; 5 6 6 7 export class HintTsDsl extends TsDsl<ts.Node> { 7 8 protected _lines: Array<string> = []; ··· 43 44 // this class does not build a standalone node; 44 45 // it modifies other nodes via `apply()`. 45 46 // Return a dummy comment node for compliance. 46 - return ts.factory.createIdentifier(''); 47 + return this.$node(new IdTsDsl('')); 47 48 } 48 49 }
+3 -2
packages/openapi-ts/src/ts-dsl/layout/newline.ts
··· 1 - import ts from 'typescript'; 1 + import type ts from 'typescript'; 2 2 3 3 import { TsDsl } from '../base'; 4 + import { IdTsDsl } from '../expr/id'; 4 5 5 6 export class NewlineTsDsl extends TsDsl<ts.Identifier> { 6 7 $render(): ts.Identifier { 7 - return ts.factory.createIdentifier('\n'); 8 + return this.$node(new IdTsDsl('\n')); 8 9 } 9 10 }
+2 -1
packages/openapi-ts/src/ts-dsl/layout/note.ts
··· 2 2 3 3 import type { MaybeArray } from '../base'; 4 4 import { TsDsl } from '../base'; 5 + import { IdTsDsl } from '../expr/id'; 5 6 6 7 export class NoteTsDsl extends TsDsl<ts.Node> { 7 8 protected _lines: Array<string> = []; ··· 41 42 // this class does not build a standalone node; 42 43 // it modifies other nodes via `apply()`. 43 44 // Return a dummy comment node for compliance. 44 - return ts.factory.createIdentifier(''); 45 + return this.$node(new IdTsDsl('')); 45 46 } 46 47 }