Skip to content

Commit 59f541a

Browse files
committed
Fixed a bug which prevented the links from being generated properly
1 parent ff88b05 commit 59f541a

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/Endpoint/Concerns/BuildsOpenApiPaths.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,12 @@ private function buildLinksObject(array $item): array
6767

6868
return [
6969
'type' => 'object',
70-
'properties' => [
71-
'self' => [
70+
'properties' => array_map(function (string $uri) {
71+
return [
7272
'type' => 'string',
73-
'example' => array_map(function (string $uri) {
74-
return [
75-
'type' => 'string',
76-
'example' => $uri,
77-
];
78-
}, $links),
79-
],
80-
],
73+
'example' => $uri,
74+
];
75+
}, $links),
8176
];
8277
}
8378

0 commit comments

Comments
 (0)