We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22f6563 commit 18e622dCopy full SHA for 18e622d
1 file changed
express-zod-api/src/logical-container.ts
@@ -24,13 +24,9 @@ type Combination<T> = T[];
24
export type Alternatives<T> = Array<Combination<T>>;
25
26
const pickHeaders = (container: LogicalContainer<Security>): string[] => {
27
- if (isSimple(container)) {
28
- return "type" in container && container.type === "header"
29
- ? [container.name]
30
- : [];
31
- }
32
if (isLogicalAnd(container)) return R.chain(pickHeaders, container.and);
33
if (isLogicalOr(container)) return R.chain(pickHeaders, container.or);
+ if (container.type === "header") return [container.name];
34
return [];
35
};
36
0 commit comments