Skip to content

Commit

Permalink
fix: returns & expects
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Dassonville committed Oct 14, 2024
1 parent 8864971 commit 7477866
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Hydra/Serializer/DocumentationNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,28 +280,28 @@ private function getHydraOperation(HttpOperation $operation, string $prefixedSho
$hydraOperation += [
'@type' => [$hydraPrefix.'Operation', 'schema:FindAction'],
$hydraPrefix.'title' => "Retrieves a $shortName resource.",
'returns' => null === $outputClass ? 'owl:Nothing' : $prefixedShortName,
'returns' => null === $outputClass ? 'owl:Nothing' : substr($prefixedShortName, 1),
];
} elseif ('PATCH' === $method) {
$hydraOperation += [
'@type' => $hydraPrefix.'Operation',
$hydraPrefix.'title' => "Updates the $shortName resource.",
'returns' => null === $outputClass ? 'owl:Nothing' : $prefixedShortName,
'expects' => null === $inputClass ? 'owl:Nothing' : $prefixedShortName,
'returns' => null === $outputClass ? 'owl:Nothing' : substr($prefixedShortName, 1),
'expects' => null === $inputClass ? 'owl:Nothing' : substr($prefixedShortName, 1),
];
} elseif ('POST' === $method) {
$hydraOperation += [
'@type' => [$hydraPrefix.'Operation', 'schema:CreateAction'],
$hydraPrefix.'title' => "Creates a $shortName resource.",
'returns' => null === $outputClass ? 'owl:Nothing' : $prefixedShortName,
'expects' => null === $inputClass ? 'owl:Nothing' : $prefixedShortName,
'returns' => null === $outputClass ? 'owl:Nothing' : substr($prefixedShortName, 1),
'expects' => null === $inputClass ? 'owl:Nothing' : substr($prefixedShortName, 1),
];
} elseif ('PUT' === $method) {
$hydraOperation += [
'@type' => [$hydraPrefix.'Operation', 'schema:ReplaceAction'],
$hydraPrefix.'title' => "Replaces the $shortName resource.",
'returns' => null === $outputClass ? 'owl:Nothing' : $prefixedShortName,
'expects' => null === $inputClass ? 'owl:Nothing' : $prefixedShortName,
'returns' => null === $outputClass ? 'owl:Nothing' : substr($prefixedShortName, 1),
'expects' => null === $inputClass ? 'owl:Nothing' : substr($prefixedShortName, 1),
];
} elseif ('DELETE' === $method) {
$hydraOperation += [
Expand Down Expand Up @@ -430,7 +430,7 @@ private function getClasses(array $entrypointProperties, array $classes, string
'@type' => $hydraPrefix.'Operation',
$hydraPrefix.'method' => 'GET',
'rdfs:label' => 'The API entrypoint.',
'returns' => '#EntryPoint',
'returns' => 'EntryPoint',
],
];

Expand Down

0 comments on commit 7477866

Please sign in to comment.