Skip to content
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

Assume isPartOf item as CreativeWork when instance of ValueInterface #49

Open
rvanlaak opened this issue Dec 6, 2019 · 0 comments
Open

Comments

@rvanlaak
Copy link
Collaborator

rvanlaak commented Dec 6, 2019

Our implementation does traverse through the properties of an ItemInterface to look for isPartOf.

The expected value of isPartOf always should be an instance of CreativeWork, as stated in the specification: https://schema.org/isPartOf

As we do not live in an ideal world, for many URLs the value of isPartOf actually just is a string. More technically; isPartOf will get returned as ValueInterface instead of as ItemInterface.

How to fix?

As the expected value always should be an instance of CreativeWork, the interpreter / parser should not parse values of isPartOf as ValueInterface, but should change them to a ItemInterface of type CreativeWork.

To support this fix; the Google Structured Data test tool does also mark these values according to the above.

Another approach; what about also adding the isPartOf method to ItemInterface with return value : ?ItemInterface? Or is that JSON-LD specific?

Test data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant