Skip to content

Commit 0a4dedf

Browse files
fix(hydra): hydra context in variable
1 parent 0454297 commit 0a4dedf

File tree

5 files changed

+903
-760
lines changed

5 files changed

+903
-760
lines changed

src/Hydra/Serializer/DocumentationNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ private function computeDoc(Documentation $object, array $classes, string $hydra
573573
private function getContext(string $hydraPrefix = ContextBuilder::HYDRA_PREFIX): array
574574
{
575575
return [
576-
'/bundles/apiplatform/hydra/context.jsonld',
576+
ContextBuilderInterface::HYDRA_CONTEXT,
577577
[
578578
'@vocab' => $this->urlGenerator->generate('api_doc', ['_format' => self::FORMAT], UrlGeneratorInterface::ABS_URL).'#',
579579
'hydra' => ContextBuilderInterface::HYDRA_NS,

src/JsonLd/ContextBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ private function getResourceContextWithShortname(string $resourceClass, int $ref
185185
}
186186

187187
if (false === ($this->defaultContext[self::HYDRA_CONTEXT_HAS_PREFIX] ?? true)) {
188-
return ['/bundles/apiplatform/hydra/context.jsonld', $context];
188+
return [ContextBuilderInterface::HYDRA_CONTEXT, $context];
189189
}
190190

191191
return $context;

0 commit comments

Comments
 (0)