mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-29 20:13:43 +03:00
fix: do not auto-append security-definitions if they are not in the spec
This commit is contained in:
parent
ca81b6dfaf
commit
426e5b67ab
|
@ -68,7 +68,12 @@ export class OpenAPIParser {
|
|||
}
|
||||
|
||||
preprocess(spec: OpenAPISpec) {
|
||||
if (!this.options.noAutoAuth && spec.info) {
|
||||
if (
|
||||
!this.options.noAutoAuth &&
|
||||
spec.info &&
|
||||
spec.components &&
|
||||
spec.components.securitySchemes
|
||||
) {
|
||||
// Automatically inject Authentication section with SecurityDefinitions component
|
||||
const description = spec.info.description || '';
|
||||
const securityRegexp = new RegExp(
|
||||
|
|
Loading…
Reference in New Issue
Block a user