mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-10 03:29:25 +03:00
Required for PathVarriables is no longer overwritten, if already set. Type is no longer overwritten if already set
This commit is contained in:
parent
7690f6cfb5
commit
35f83640d6
@ -33,8 +33,12 @@ final class RouteMetadataDescriber implements RouteDescriberInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$parameter = $operation->getParameters()->get($pathVariable, 'path');
|
$parameter = $operation->getParameters()->get($pathVariable, 'path');
|
||||||
|
if (null === $parameter->getRequired()) {
|
||||||
$parameter->setRequired(true);
|
$parameter->setRequired(true);
|
||||||
|
}
|
||||||
|
if(null === $parameter->getType()) {
|
||||||
$parameter->setType('string');
|
$parameter->setType('string');
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($requirements[$pathVariable])) {
|
if (isset($requirements[$pathVariable])) {
|
||||||
$parameter->setFormat($requirements[$pathVariable]);
|
$parameter->setFormat($requirements[$pathVariable]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user