Skip to content

Commit

Permalink
Merge pull request #1508 from sinchang/feature/add-uiconfig-type
Browse files Browse the repository at this point in the history
feat: add type for fastify swaggger uiConfig
  • Loading branch information
kamilmysliwiec committed Sep 28, 2021
2 parents a3cd446 + b182249 commit dd72272
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion lib/interfaces/swagger-custom-options.interface.ts
Expand Up @@ -17,7 +17,28 @@ export interface ExpressSwaggerCustomOptions extends CommonSwaggerCustomOptions
}

export interface FastifySwaggerCustomOptions extends CommonSwaggerCustomOptions {
uiConfig?: Record<string, any>;
uiConfig?: Partial<{
deepLinking: boolean;
displayOperationId: boolean;
defaultModelsExpandDepth: number;
defaultModelExpandDepth: number;
defaultModelRendering: string;
displayRequestDuration: boolean;
docExpansion: string;
filter: boolean | string;
maxDisplayedTags: number;
showExtensions: boolean;
showCommonExtensions: boolean;
useUnsafeMarkdown: boolean;
syntaxHighlight:
| {
activate?: boolean;
theme?: string;
}
| false;
tryItOutEnabled: boolean;
validatorUrl: string | null;
}>;
initOAuth?: Record<string, any>;
staticCSP?: boolean | string | Record<string, string | string[]>;
transformStaticCSP?: (header: string) => string;
Expand Down

3 comments on commit dd72272

@nikitakoschelenko
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@jmcdo29
Copy link
Member

@jmcdo29 jmcdo29 commented on dd72272 Nov 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to make a PR to add it? Does a whole lot better than commenting on a random commit and making noise :)

@nikitakoschelenko
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to make a PR to add it? Does a whole lot better than commenting on a random commit and making noise :)

You're right - #1658.

Please sign in to comment.