mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
fix(openapi): show authentication options even when security is not defined in spec
This commit is contained in:
parent
57572ef517
commit
ef2341b6b1
1 changed files with 3 additions and 3 deletions
|
|
@ -99,9 +99,9 @@ const OpenApi = ({
|
|||
const resolveSecurities = (spec) => {
|
||||
const authArray = [];
|
||||
const ApiKeys = [];
|
||||
const securities = spec['security'];
|
||||
if (securities) {
|
||||
const scheme = spec?.components?.securitySchemes;
|
||||
const scheme = spec?.components?.securitySchemes || {};
|
||||
const securities = spec['security'] || Object.keys(scheme).map((k) => ({ [k]: [] }));
|
||||
if (Array.isArray(securities) && securities.length > 0) {
|
||||
securities.map((security) => {
|
||||
const authNames = Object.keys(security);
|
||||
if (authNames.length > 1) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue