Skip to content

Commit 09e577e

Browse files
committed
tests: add test with empty security
1 parent a60c960 commit 09e577e

4 files changed

Lines changed: 71 additions & 0 deletions

File tree

tests/e2e/join/join.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ describe('join', () => {
2424
'root-security-in-both-specs',
2525
'root-security-without-paths',
2626
'operation-security-over-root-security',
27+
'operation-empty-security-over-root-security',
2728
];
2829

2930
test.each(testDirNames)('test: %s', async (dir) => {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
openapi: 3.1.0
2+
info:
3+
title: "spec1"
4+
version: 1.0.0
5+
servers:
6+
- url: https://api.example.com
7+
paths:
8+
/public:
9+
get:
10+
security: []
11+
summary: Public endpoint
12+
operationId: public
13+
responses:
14+
200:
15+
description: OK
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
openapi: 3.1.0
2+
info:
3+
title: "spec1"
4+
version: 1.0.0
5+
servers:
6+
- url: https://api.example.com
7+
security:
8+
- oauth2: []
9+
components:
10+
securitySchemes:
11+
oauth2:
12+
type: oauth2
13+
flows:
14+
authorizationCode:
15+
authorizationUrl: https://example.com/oauth/authorize
16+
tokenUrl: https://example.com/oauth/token
17+
scopes: {}
18+
paths: {}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
openapi: 3.1.0
3+
info:
4+
title: spec1
5+
version: 1.0.0
6+
servers:
7+
- url: https://api.example.com
8+
tags:
9+
- name: bar_other
10+
x-displayName: other
11+
paths:
12+
/public:
13+
get:
14+
security: []
15+
summary: Public endpoint
16+
operationId: public
17+
responses:
18+
'200':
19+
description: OK
20+
tags:
21+
- bar_other
22+
components:
23+
securitySchemes:
24+
oauth2:
25+
type: oauth2
26+
flows:
27+
authorizationCode:
28+
authorizationUrl: https://example.com/oauth/authorize
29+
tokenUrl: https://example.com/oauth/token
30+
scopes: {}
31+
x-tagGroups:
32+
- name: spec1
33+
tags:
34+
- bar_other
35+
36+
openapi.yaml: join processed in <test>ms
37+

0 commit comments

Comments
 (0)