-
Notifications
You must be signed in to change notification settings - Fork 203
Open
Labels
Type: BugSomething isn't workingSomething isn't workingp2questionFurther information is requestedFurther information is requested
Description
Describe the bug
security section is not joined in the output if a schema specify the security section in the root level
To Reproduce
spec1.yaml:
openapi: 3.1.0
info:
title: "spec1"
version: 1.0.0
servers:
- url: https://api.example.com
security:
- oauth2: []
components:
securitySchemes:
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://example.com/oauth/authorize
tokenUrl: https://example.com/oauth/token
scopes: {}
paths: {}spec2.yaml:
openapi: 3.1.0
info:
title: "spec1"
version: 1.0.0
servers:
- url: https://api.example.com
paths:
/post:
get:
summary: Example
operationId: example
responses:
200:
description: OK
400:
description: Bad requestrun command: npx @redocly/cli join spec1.yaml spec2.yaml -o joined.yaml
output:
openapi: 3.1.0
info:
title: spec1
version: 1.0.0
servers:
- url: https://api.example.com
tags:
- name: spec2_other
x-displayName: other
paths:
/post:
get:
summary: Example
operationId: example
responses:
'200':
description: OK
'400':
description: Bad request
tags:
- spec2_other
components:
securitySchemes:
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://example.com/oauth/authorize
tokenUrl: https://example.com/oauth/token
scopes: {}
x-tagGroups:
- name: spec2
tags:
- spec2_otherExpected behavior
the security in the root level must be present in the output
OpenAPI description
oas version: 3.1
Redocly Version(s)
1.6.0
Node.js Version(s)
v20.10.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: BugSomething isn't workingSomething isn't workingp2questionFurther information is requestedFurther information is requested