Skip to content

@sourceloop/core / Exports / CoreConfig

Interface: CoreConfig

Table of contents

Properties

Properties

authenticateSwaggerUI

Optional authenticateSwaggerUI: boolean

Defined in

packages/core/src/types.ts:36


authentication

Optional authentication: boolean

Defined in

packages/core/src/types.ts:33


configObject

Optional configObject: ConfigurationOptions

Defined in

packages/core/src/types.ts:18


enableObf

Optional enableObf: boolean

Defined in

packages/core/src/types.ts:19


modifyPathDefinition

Optional modifyPathDefinition: (path: string, pathDefinition: OASPathDefinition) => null | OASPathDefinition

Type declaration

▸ (path, pathDefinition): null | OASPathDefinition

In order to hide or alter some path from the definition provided by swagger stats, modifyPathDefinition callback can be used. It'll get called for each of the path specified in the openapiSpec provided.

Parameters
Name Type Description
path string The name of the API path.
pathDefinition OASPathDefinition The definition object containing method and other details.
Returns

null | OASPathDefinition

null if the path needs to be omitted from the spec else return the pathDefinition either in the original form as received in the argument or by modifying it as per the needs.

Defined in

packages/core/src/types.ts:29


name

Optional name: string

Defined in

packages/core/src/types.ts:17


obfPath

Optional obfPath: string

Defined in

packages/core/src/types.ts:20


openapiSpec

Optional openapiSpec: Record<string, unknown>

Defined in

packages/core/src/types.ts:21


swaggerAuthenticate

Optional swaggerAuthenticate: (req?: IncomingMessage, username?: string, password?: string) => boolean

Type declaration

▸ (req?, username?, password?): boolean

Parameters
Name Type
req? IncomingMessage
username? string
password? string
Returns

boolean

Defined in

packages/core/src/types.ts:43


swaggerPassword

Optional swaggerPassword: string

Defined in

packages/core/src/types.ts:35


swaggerStatsConfig

Optional swaggerStatsConfig: Omit<Partial<{}>, "name" | "uriPath" | "swaggerSpec" | "authentication" | "onAuthenticate">

Defined in

packages/core/src/types.ts:38


swaggerUsername

Optional swaggerUsername: string

Defined in

packages/core/src/types.ts:34