-
-
Notifications
You must be signed in to change notification settings - Fork 848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #1224 json-ld context should not be prefixed by # #1296
Conversation
src/JsonLd/ContextBuilder.php
Outdated
@@ -89,7 +89,7 @@ public function getResourceContext(string $resourceClass, int $referenceType = U | |||
{ | |||
$context = $this->getBaseContext($referenceType); | |||
$resourceMetadata = $this->resourceMetadataFactory->create($resourceClass); | |||
$prefixedShortName = sprintf('#%s', $resourceMetadata->getShortName()); | |||
$prefixedShortName = sprintf('%s', $resourceMetadata->getShortName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sprintf
is now useless 😛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hahaha omg
Please check if our frontend tools still work with this change. |
👍 this is one of my concerns, ping @mysiar |
@dunglas I checked in neither For release-safety I can rebase this on |
I'm sure we are using it when we normalize the JSON-LD document (the jsonld library used by api-doc-parser does it under the hood).
… Le 1 août 2017 à 09:10, Antoine Bluchet ***@***.***> a écrit :
@dunglas I checked in neither admin nor crud-generate are we using the JSON-LD /context endpoint. Something else we'd need to check?
For release-safety I can rebase this on master instead of 2.0 and we flag it in the changelog for the next stable. WDYT?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
please check https://www.w3.org/TR/json-ld/#the-context Example 24 and description, it might be relevant |
Got it. We should add a test on the json-ld repository to see if it's ok. |
In fact according to the json-ld tests this patch will work just fine as is closer to the specs. Or we may include the api url instead of using relative paths. |
Ok let's merge this when the build will be green. |
@dunglas tests pass, just appveyor having issues with php not being installed?! |
Try to restart your build, looks like this happens occasionally with chocolatey.org... |
👍 I'm not able to do it I think @dunglas can. |
Force push 😛 |
Looks good, feel free to merge @soyuka. |
Fix api-platform#1224 json-ld context should not be prefixed by #
According to the specs I think that the
#
character is there to separate the URL from the given element, for example:I'm really no json-ld expert, let me know if removing
#
doesn't seem correct to you.