-
-
Notifications
You must be signed in to change notification settings - Fork 892
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(jsonld): allow @id, @context and @type on denormalization 2 #6451
Conversation
this is perfect, would you be able to add a test? |
"bar": "b" | ||
} | ||
""" | ||
|
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.
Could you also add a test that ensures an error is thrown if the value of the @id
key doesn't match the URL?
Co-authored-by: Kévin Dunglas <[email protected]>
I was not available but I see a test was already added. Side note I see you were discussing:
If the |
@@ -47,6 +49,29 @@ final class ItemNormalizer extends AbstractItemNormalizer | |||
use JsonLdContextTrait; | |||
|
|||
public const FORMAT = 'jsonld'; | |||
public const JSONLD_KEYWORDS = [ |
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.
This could maybe be an @internal
enum?
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.
too much trouble transforming an enum to an array this is more efficient imo, I could set private
visibility?
thanks @ili101 ! |
Allaw
@id
,@type
,@context
with JsonLd. With this it's possible to use the@id
as described in the documentation while usingallow_extra_attributes: false
.More info in #6402.