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

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

Showing with 7 additions and 1 deletion
+7 -1
...@@ -320,11 +320,17 @@ final class ModelGenerator ...@@ -320,11 +320,17 @@ final class ModelGenerator
return null; return null;
} }
$iri = null;
if (isset($opsMeta['getitem'])) { if (isset($opsMeta['getitem'])) {
$get = $opsMeta['getitem']; $get = $opsMeta['getitem'];
$iri = $pathParser->parse($get->getPath(), $get->getRequirements()); $iri = $pathParser->parse($get->getPath(), $get->getRequirements());
} else { } else {
$iri = null; foreach ($opsMeta as $operation) {
if ($operation->isItemOperation()) {
$iri = $pathParser->parse($operation->getPath(), $operation->getRequirements());
break;
}
}
} }
foreach ($opsMeta as $operation) { foreach ($opsMeta as $operation) {
......
Supports Markdown
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