[BUG] null Security Scheme is invalid
Closed this issue · 0 comments
rickmacgillis commented
The Problem
When defining security schemes, you don't enter the "null" security scheme, but you do use the placeholder "null" in "securedBy" as stated in the official RAML 0.8 spec. When referencing the "null" security scheme, the project complains that it couldn't located it as a "securitySchemes" entry.
The solution
Change L#175 of \Raml\Method as follows.
if (empty($securedBy)) {
$method->addSecurityScheme(SecurityScheme::createFromArray('null', array(), $apiDefinition));
} else {
$method->addSecurityScheme($apiDefinition->getSecurityScheme($securedBy));
}