Skip to content

Commit 21ba5d5

Browse files
authored
fix: hydra:view example values (#4681)
1 parent 17df55a commit 21ba5d5

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

features/openapi/docs.feature

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,14 @@ Feature: Documentation support
155155
"type": "string",
156156
"format": "iri-reference"
157157
}
158+
},
159+
"example": {
160+
"@id": "string",
161+
"type": "string",
162+
"hydra:first": "string",
163+
"hydra:last": "string",
164+
"hydra:previous": "string",
165+
"hydra:next": "string"
158166
}
159167
},
160168
"hydra:search": {

src/Hydra/JsonSchema/SchemaFactory.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ public function buildSchema(string $className, string $format = 'jsonld', string
140140
'format' => 'iri-reference',
141141
],
142142
],
143+
'example' => [
144+
'@id' => 'string',
145+
'type' => 'string',
146+
'hydra:first' => 'string',
147+
'hydra:last' => 'string',
148+
'hydra:previous' => 'string',
149+
'hydra:next' => 'string',
150+
],
143151
],
144152
'hydra:search' => [
145153
'type' => 'object',

0 commit comments

Comments
 (0)