- edited description
Validate security spec of an operation
Issue #30
resolved
We noticed that security spec of an operation isn't validated against top level securityDefinitions. e.g. if we have the following top level securityDefinitions and a security definition on an operation.
{
"securityDefinitions": {
"Bearer": {
"type": "apiKey",
"name": "Authorization",
"in": "header",
"description": "Authentication by Bearer token"
}
},
"paths": {
"/hello": {
"get": {
"security": [{
"Bearer": []
}]
}
}
}
}
calling GET /hello without an Authorisation header is validated.
Comments (4)
-
reporter -
reporter We are happy to submit a PR for this.
-
Yep - this one has been on my list for a while. Currently there is no validation of security specs at all.
PRs will be gratefully accepted! (Just note the contributor section in the README - a signed CLA will be required before I can merge in any contributions). Thanks!
-
- changed status to resolved
Available in v1.0.9
- Log in to comment