@@ -99,7 +99,7 @@ private function populateEntrypointProperties(ApiResource $resourceMetadata, str
9999 '@id ' => \sprintf ('#Entrypoint/%s ' , lcfirst ($ shortName )),
100100 '@type ' => $ hydraPrefix .'Link ' ,
101101 'domain ' => '#Entrypoint ' ,
102- 'rdfs:label ' => "The collection of $ shortName resources " ,
102+ 'rdfs:label ' => "get { $ shortName} Collection " ,
103103 'rdfs:range ' => [
104104 ['@id ' => $ hydraPrefix .'Collection ' ],
105105 [
@@ -313,8 +313,9 @@ private function getHydraOperation(HttpOperation $operation, string $prefixedSho
313313
314314 $ hydraOperation [$ hydraPrefix .'method ' ] ?? $ hydraOperation [$ hydraPrefix .'method ' ] = $ method ;
315315
316- if (!isset ($ hydraOperation ['rdfs:label ' ]) && isset ($ hydraOperation [$ hydraPrefix .'title ' ])) {
317- $ hydraOperation ['rdfs:label ' ] = $ hydraOperation [$ hydraPrefix .'title ' ];
316+ if (!isset ($ hydraOperation ['rdfs:label ' ])) {
317+ // we know that this name is unique
318+ $ hydraOperation ['rdfs:label ' ] = $ operation ->getName ();
318319 }
319320
320321 ksort ($ hydraOperation );
@@ -429,7 +430,8 @@ private function getClasses(array $entrypointProperties, array $classes, string
429430 $ hydraPrefix .'supportedOperation ' => [
430431 '@type ' => $ hydraPrefix .'Operation ' ,
431432 $ hydraPrefix .'method ' => 'GET ' ,
432- 'rdfs:label ' => 'The API entrypoint. ' ,
433+ 'title ' => 'The API entrypoint. ' ,
434+ 'rdfs:label ' => 'getEntrypoint ' ,
433435 'returns ' => 'EntryPoint ' ,
434436 ],
435437 ];
0 commit comments