Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: security support added to operation and operationTrait #189

Merged
merged 1 commit into from
Apr 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions schemas/2.4.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,12 @@
"operationId": {
"type": "string"
},
"security": {
Copy link
Member

@smoya smoya Mar 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to extract this into a new definition called SecurityRequirements or similar? Then you will just need to use it by "$ref": "#/definitions/SecurityRequirements"

Copy link

@sekharbans-ebay sekharbans-ebay Mar 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to extract this into a new definition called SecurityRequirements or similar? Then you will just need to use it by "$ref": "#/definitions/SecurityRequirements"

Hi @smoya - Its an array of SecurityRequirements. Not sure if just indicating an array of a complex definition warrants a new definition. If so, such a pattern would need to apply consistently to all similar constructs that refer to an array (tags for example). Not sure it carries much benefits. At least for me - not creating a new definition but just knowing its an array of an existing definition is easier. Up to you folks :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough 👍 I agree we would need to be consistent and lot of changes will need to be applied.

"type": "array",
"items": {
"$ref": "#/definitions/SecurityRequirement"
}
},
"bindings": {
"$ref": "#/definitions/bindingsObject"
},
Expand Down Expand Up @@ -870,6 +876,12 @@
"description": {
"type": "string"
},
"security": {
"type": "array",
"items": {
"$ref": "#/definitions/SecurityRequirement"
}
},
"tags": {
"type": "array",
"items": {
Expand Down