@sourceloop/core / Exports / CoreConfig
Interface: CoreConfig¶
Table of contents¶
Properties¶
- authenticateSwaggerUI
- authentication
- configObject
- enableObf
- modifyPathDefinition
- name
- obfPath
- openapiSpec
- swaggerAuthenticate
- swaggerPassword
- swaggerStatsConfig
- swaggerUsername
Properties¶
authenticateSwaggerUI¶
• Optional
authenticateSwaggerUI: boolean
Defined in¶
authentication¶
• Optional
authentication: boolean
Defined in¶
configObject¶
• Optional
configObject: ConfigurationOptions
Defined in¶
enableObf¶
• Optional
enableObf: boolean
Defined in¶
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¶
name¶
• Optional
name: string
Defined in¶
obfPath¶
• Optional
obfPath: string
Defined in¶
openapiSpec¶
• Optional
openapiSpec: Record
<string
, unknown
>
Defined in¶
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¶
swaggerPassword¶
• Optional
swaggerPassword: string
Defined in¶
swaggerStatsConfig¶
• Optional
swaggerStatsConfig: Omit
<Partial
<{}>, "name"
| "uriPath"
| "swaggerSpec"
| "authentication"
| "onAuthenticate"
>
Defined in¶
swaggerUsername¶
• Optional
swaggerUsername: string