Skip to content
Permalink
Browse files

Expose hydra:title and hydra:description for referenced external conc…

…epts

... instead of "overwriting" rdfs:label and rdfs:comment. Locally defined concepts are being described using RDFS.
  • Loading branch information...
lanthaler committed Jul 20, 2014
1 parent e5fa886 commit 360fa5006804b9fde45b0486d7ef0fa4e7ceae8d
Showing with 8 additions and 1 deletion.
  1. +8 −1 HydraApi.php
@@ -240,7 +240,12 @@ public function getDocumentation()
foreach ($metadata as $class) {
if ($class->isExternalReference()) {
$docu['supportedClass'][] = array(
'@id' => $class->getIri()
'@id' => $class->getIri(),
'@type' => 'hydra:Class',
'hydra:title' => $class->getTitle(),
'hydra:description' => $class->getDescription(),
'supportedOperation' => $this->documentOperations($class->getOperations()),
'supportedProperty' => $this->documentClassProperties($class),
);
} else {
$docu['supportedClass'][] = array(
@@ -327,6 +332,8 @@ private function documentClassProperties(\ML\HydraBundle\Mapping\ClassMetadata $
'range' => $this->getTypeReferenceIri($property->getType()),
'supportedOperation' => $this->documentOperations($property->getOperations())
),
'hydra:title' => $property->getTitle(),
'hydra:description' => $property->getDescription(),
'required' => $property->getRequired(),
'readonly' => $property->isReadOnly(),
'writeonly' => $property->isWriteOnly()

0 comments on commit 360fa50

Please sign in to comment.
You can’t perform that action at this time.