From 0614df6833dcbf323be6a4f4a461b97c1cc8fe51 Mon Sep 17 00:00:00 2001 From: brycematheson1234 Date: Tue, 3 Dec 2019 12:46:39 +1100 Subject: [PATCH] Added responseInterceptor swagger-ui-dist (#40643) * Added responseInterceptor * Fixed typo --- types/swagger-ui-dist/index.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/types/swagger-ui-dist/index.d.ts b/types/swagger-ui-dist/index.d.ts index d1ce0fe868..cdc48b7b74 100644 --- a/types/swagger-ui-dist/index.d.ts +++ b/types/swagger-ui-dist/index.d.ts @@ -99,6 +99,12 @@ export interface SwaggerConfigs { */ requestInterceptor?: ((request: SwaggerRequest) => SwaggerRequest); + /** + * Function to intercept remote definition, "Try it out", and OAuth 2.0 responses. + * Accepts one argument responseInterceptor(response) and must return the modified response, or a Promise that resolves to the modified response. + */ + responseInterceptor?: ((response: SwaggerResponse) => SwaggerResponse); + [k: string]: any; } @@ -118,4 +124,8 @@ export interface SwaggerRequest { [k: string]: any; } +export interface SwaggerResponse { + [k: string]: any; +} + export const SwaggerUIStandalonePreset: any;