Skip to content

Commit 92009ff

Browse files
fix(hydra): hydra context in variable
1 parent 0454297 commit 92009ff

File tree

8 files changed

+5463
-822
lines changed

8 files changed

+5463
-822
lines changed

features/hydra/docs.feature

Lines changed: 903 additions & 1 deletion
Large diffs are not rendered by default.

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/Hydra/Tests/Serializer/DocumentationNormalizerTest.php

Lines changed: 2757 additions & 60 deletions
Large diffs are not rendered by default.

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;

src/JsonLd/ContextBuilderInterface.php

Lines changed: 901 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)