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

@context not being set correctly #41

Open
nickevansuk opened this issue Apr 27, 2020 · 1 comment
Open

@context not being set correctly #41

nickevansuk opened this issue Apr 27, 2020 · 1 comment

Comments

@nickevansuk
Copy link
Contributor

Issue report

Not specifically setting @context, the models auto generated 3 urls and https://openactive.io/ was not first as the validator requires.

Suggested resolution

serialize($obj, $prettyPrint = false) should accept a parameter for $schemaContext = false, which will add "https://schema.org/" as the first element in the @context array of the root.

The function should also detect if any keys in JSON to be outputted contain the "beta:" prefix, and add "https://openactive.io/ns-beta" as the last element in the @context array if so.

@nathansalter
Copy link
Contributor

Isn't this already implemented?

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

2 participants