Skip to content

Commit f307998

Browse files
committed
fix getClassType with no readableLink
1 parent f0ccfff commit f307998

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

TypeFactory.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,15 @@ private function getClassType(?string $className, string $format = 'json', ?bool
9999
return ['type' => 'string'];
100100
}
101101

102-
if ($this->isResourceClass($className) && true !== $readableLink) {
103-
return [
104-
'type' => 'string',
105-
'format' => 'iri-reference',
106-
];
102+
if (true !== $readableLink) {
103+
if ($this->isResourceClass($className)) {
104+
return [
105+
'type' => 'string',
106+
'format' => 'iri-reference',
107+
];
108+
}
109+
110+
return ['type' => 'string'];
107111
}
108112

109113
$version = $schema->getVersion();

0 commit comments

Comments
 (0)