From 9d5852af38b65234fee651d8641865da1acb73ab Mon Sep 17 00:00:00 2001 From: Ross Rogers Date: Wed, 12 Jul 2023 12:06:50 -0700 Subject: [PATCH] Enable specifying accepted mimeTypes --- src/apis/avantation.ts | 2 +- src/interfaces/avantation.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apis/avantation.ts b/src/apis/avantation.ts index fd5a597..f08bbb1 100644 --- a/src/apis/avantation.ts +++ b/src/apis/avantation.ts @@ -42,7 +42,7 @@ export class AvantationAPI implements Avantation.InputConfig { this.out = input.out; this.pathRegex = new RegExp(this.pathParamRegex); this.oclif = oclif; - this.mimeTypes = ['application/json', '', 'application/json; charset=utf-8']; + this.mimeTypes = input.mimeTypes || ['application/json', '', 'application/json; charset=utf-8']; this.disableTag = input.disableTag; this.securityHeaders = input.securityHeaders; this['http-snippet'] = input['http-snippet']; diff --git a/src/interfaces/avantation.ts b/src/interfaces/avantation.ts index f5a9875..89a3374 100644 --- a/src/interfaces/avantation.ts +++ b/src/interfaces/avantation.ts @@ -59,4 +59,5 @@ export interface InputConfig { disableTag: boolean; securityHeaders: OAS.SecurityMap; 'http-snippet': boolean; + mimeTypes?: string[]; }