For OAS 3:
{
"securitySchemes": {
"oauth2": {
"type": "oauth2",
"flows": {}
}
}
}
This causes the code to fail at: "authScheme = secDefinition.scheme.toLowerCase();", as scheme doesn't exist for type oauth2.
Thereby, causing 'Cannot call method 'toLowerCase' of undefined'.
For OAS 3: { "securitySchemes": { "oauth2": { "type": "oauth2", "flows": {} } } } This causes the code to fail at: "authScheme = secDefinition.scheme.toLowerCase();", as scheme doesn't exist for type oauth2. Thereby, causing 'Cannot call method 'toLowerCase' of undefined'.
Please review https://github.com/ErikWittern/openapi-snippet/pull/42 for the fix.