@@ -12,6 +12,11 @@ import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
12
12
/**
13
13
* REST APIs for managing ApiEndpoint entities
14
14
*/
15
+ export enum GeneratePostmanCollectionForApiEndpointAcceptEnum {
16
+ applicationJson = "application/json" ,
17
+ applicationOctetStream = "application/octet-stream" ,
18
+ }
19
+
15
20
export class ApiEndpoints {
16
21
private sdkConfiguration : SDKConfiguration ;
17
22
@@ -48,6 +53,7 @@ export class ApiEndpoints {
48
53
49
54
const headers = { ...config ?. headers } ;
50
55
headers [ "Accept" ] = "application/json" ;
56
+
51
57
headers [
52
58
"user-agent"
53
59
] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -122,7 +128,8 @@ export class ApiEndpoints {
122
128
this . sdkConfiguration . securityClient || this . sdkConfiguration . defaultClient ;
123
129
124
130
const headers = { ...config ?. headers } ;
125
- headers [ "Accept" ] = "application/json;q=1, application/json;q=0" ;
131
+ headers [ "Accept" ] = "application/json" ;
132
+
126
133
headers [
127
134
"user-agent"
128
135
] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -210,7 +217,8 @@ export class ApiEndpoints {
210
217
this . sdkConfiguration . securityClient || this . sdkConfiguration . defaultClient ;
211
218
212
219
const headers = { ...config ?. headers } ;
213
- headers [ "Accept" ] = "application/json;q=1, application/json;q=0" ;
220
+ headers [ "Accept" ] = "application/json" ;
221
+
214
222
headers [
215
223
"user-agent"
216
224
] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -278,7 +286,8 @@ export class ApiEndpoints {
278
286
*/
279
287
async generatePostmanCollectionForApiEndpoint (
280
288
req : operations . GeneratePostmanCollectionForApiEndpointRequest ,
281
- config ?: AxiosRequestConfig
289
+ config ?: AxiosRequestConfig ,
290
+ acceptHeaderOverride ?: GeneratePostmanCollectionForApiEndpointAcceptEnum
282
291
) : Promise < operations . GeneratePostmanCollectionForApiEndpointResponse > {
283
292
if ( ! ( req instanceof utils . SpeakeasyBase ) ) {
284
293
req = new operations . GeneratePostmanCollectionForApiEndpointRequest ( req ) ;
@@ -298,7 +307,12 @@ export class ApiEndpoints {
298
307
this . sdkConfiguration . securityClient || this . sdkConfiguration . defaultClient ;
299
308
300
309
const headers = { ...config ?. headers } ;
301
- headers [ "Accept" ] = "application/json;q=1, application/octet-stream;q=0" ;
310
+ if ( acceptHeaderOverride !== undefined ) {
311
+ headers [ "Accept" ] = acceptHeaderOverride . toString ( ) ;
312
+ } else {
313
+ headers [ "Accept" ] = "application/json;q=1, application/octet-stream;q=0" ;
314
+ }
315
+
302
316
headers [
303
317
"user-agent"
304
318
] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -376,7 +390,8 @@ export class ApiEndpoints {
376
390
this . sdkConfiguration . securityClient || this . sdkConfiguration . defaultClient ;
377
391
378
392
const headers = { ...config ?. headers } ;
379
- headers [ "Accept" ] = "application/json;q=1, application/json;q=0" ;
393
+ headers [ "Accept" ] = "application/json" ;
394
+
380
395
headers [
381
396
"user-agent"
382
397
] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -464,7 +479,8 @@ export class ApiEndpoints {
464
479
this . sdkConfiguration . securityClient || this . sdkConfiguration . defaultClient ;
465
480
466
481
const headers = { ...config ?. headers } ;
467
- headers [ "Accept" ] = "application/json;q=1, application/json;q=0" ;
482
+ headers [ "Accept" ] = "application/json" ;
483
+
468
484
headers [
469
485
"user-agent"
470
486
] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -552,7 +568,8 @@ export class ApiEndpoints {
552
568
this . sdkConfiguration . securityClient || this . sdkConfiguration . defaultClient ;
553
569
554
570
const headers = { ...config ?. headers } ;
555
- headers [ "Accept" ] = "application/json;q=1, application/json;q=0" ;
571
+ headers [ "Accept" ] = "application/json" ;
572
+
556
573
headers [
557
574
"user-agent"
558
575
] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -651,7 +668,8 @@ export class ApiEndpoints {
651
668
const headers = { ...reqBodyHeaders , ...config ?. headers } ;
652
669
if ( reqBody == null || Object . keys ( reqBody ) . length === 0 )
653
670
throw new Error ( "request body is required" ) ;
654
- headers [ "Accept" ] = "application/json;q=1, application/json;q=0" ;
671
+ headers [ "Accept" ] = "application/json" ;
672
+
655
673
headers [
656
674
"user-agent"
657
675
] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
0 commit comments