@@ -12,6 +12,11 @@ import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
1212/**
1313 * REST APIs for managing ApiEndpoint entities
1414 */
15+ export enum GeneratePostmanCollectionForApiEndpointAcceptEnum {
16+ applicationJson = "application/json" ,
17+ applicationOctetStream = "application/octet-stream" ,
18+ }
19+
1520export class ApiEndpoints {
1621 private sdkConfiguration : SDKConfiguration ;
1722
@@ -48,6 +53,7 @@ export class ApiEndpoints {
4853
4954 const headers = { ...config ?. headers } ;
5055 headers [ "Accept" ] = "application/json" ;
56+
5157 headers [
5258 "user-agent"
5359 ] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -122,7 +128,8 @@ export class ApiEndpoints {
122128 this . sdkConfiguration . securityClient || this . sdkConfiguration . defaultClient ;
123129
124130 const headers = { ...config ?. headers } ;
125- headers [ "Accept" ] = "application/json;q=1, application/json;q=0" ;
131+ headers [ "Accept" ] = "application/json" ;
132+
126133 headers [
127134 "user-agent"
128135 ] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -210,7 +217,8 @@ export class ApiEndpoints {
210217 this . sdkConfiguration . securityClient || this . sdkConfiguration . defaultClient ;
211218
212219 const headers = { ...config ?. headers } ;
213- headers [ "Accept" ] = "application/json;q=1, application/json;q=0" ;
220+ headers [ "Accept" ] = "application/json" ;
221+
214222 headers [
215223 "user-agent"
216224 ] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -278,7 +286,8 @@ export class ApiEndpoints {
278286 */
279287 async generatePostmanCollectionForApiEndpoint (
280288 req : operations . GeneratePostmanCollectionForApiEndpointRequest ,
281- config ?: AxiosRequestConfig
289+ config ?: AxiosRequestConfig ,
290+ acceptHeaderOverride ?: GeneratePostmanCollectionForApiEndpointAcceptEnum
282291 ) : Promise < operations . GeneratePostmanCollectionForApiEndpointResponse > {
283292 if ( ! ( req instanceof utils . SpeakeasyBase ) ) {
284293 req = new operations . GeneratePostmanCollectionForApiEndpointRequest ( req ) ;
@@ -298,7 +307,12 @@ export class ApiEndpoints {
298307 this . sdkConfiguration . securityClient || this . sdkConfiguration . defaultClient ;
299308
300309 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+
302316 headers [
303317 "user-agent"
304318 ] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -376,7 +390,8 @@ export class ApiEndpoints {
376390 this . sdkConfiguration . securityClient || this . sdkConfiguration . defaultClient ;
377391
378392 const headers = { ...config ?. headers } ;
379- headers [ "Accept" ] = "application/json;q=1, application/json;q=0" ;
393+ headers [ "Accept" ] = "application/json" ;
394+
380395 headers [
381396 "user-agent"
382397 ] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -464,7 +479,8 @@ export class ApiEndpoints {
464479 this . sdkConfiguration . securityClient || this . sdkConfiguration . defaultClient ;
465480
466481 const headers = { ...config ?. headers } ;
467- headers [ "Accept" ] = "application/json;q=1, application/json;q=0" ;
482+ headers [ "Accept" ] = "application/json" ;
483+
468484 headers [
469485 "user-agent"
470486 ] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -552,7 +568,8 @@ export class ApiEndpoints {
552568 this . sdkConfiguration . securityClient || this . sdkConfiguration . defaultClient ;
553569
554570 const headers = { ...config ?. headers } ;
555- headers [ "Accept" ] = "application/json;q=1, application/json;q=0" ;
571+ headers [ "Accept" ] = "application/json" ;
572+
556573 headers [
557574 "user-agent"
558575 ] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
@@ -651,7 +668,8 @@ export class ApiEndpoints {
651668 const headers = { ...reqBodyHeaders , ...config ?. headers } ;
652669 if ( reqBody == null || Object . keys ( reqBody ) . length === 0 )
653670 throw new Error ( "request body is required" ) ;
654- headers [ "Accept" ] = "application/json;q=1, application/json;q=0" ;
671+ headers [ "Accept" ] = "application/json" ;
672+
655673 headers [
656674 "user-agent"
657675 ] = `speakeasy-sdk/${ this . sdkConfiguration . language } ${ this . sdkConfiguration . sdkVersion } ${ this . sdkConfiguration . genVersion } ${ this . sdkConfiguration . openapiDocVersion } ` ;
0 commit comments