Commit 0fa46b48 authored by Guillaume Perréal's avatar Guillaume Perréal

S'il n'y a pas d'opération get, teste les autres opérations pour trouver un modèle IRI.

parent 5eb35958
......@@ -320,11 +320,17 @@ final class ModelGenerator
return null;
}
$iri = null;
if (isset($opsMeta['getitem'])) {
$get = $opsMeta['getitem'];
$iri = $pathParser->parse($get->getPath(), $get->getRequirements());
} else {
$iri = null;
foreach ($opsMeta as $operation) {
if ($operation->isItemOperation()) {
$iri = $pathParser->parse($operation->getPath(), $operation->getRequirements());
break;
}
}
}
foreach ($opsMeta as $operation) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment