Skip to content

How to find current version of schema.org programmatically? #2841

@stain

Description

@stain

https://schema.org/docs/developers.html tells developers to download schema.org definition using URLs like
https://schema.org/version/latest/schemaorg-current-http.jsonld - note latest

We saw in #2805 how named versions, replacing latest with 11.0 for instance, have temporarily disappeared with 404.

While I'm sure this will be corrected, the use of latest above still raises the question of how software can detect/record which version of schema.org they have used or been built with (or if they should be updated).

Previously we have used the fact that the .jsonld file included:

"@id": "http://schema.org/#10.0"

http://schema.org/#10.0 works, but of course that page has no #10.0 but we were able to string-replace from that to find the version.

Now since 11.0 this @id has disappeared from the JSON-LD download, presumably to avoid the definitions being in a named graph? (I'm did look to hard yet to find the corresponding issue)

At the moment https://schema.org/version/latest/schemaorg-current-http.nq still includes such a named graph identifier, however slightly different:

<http://schema.org/exifData> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://schema.org/11.01> .

It should be obvious that it is useful to have a versioned identifier for Schema.org.

Now http://schema.org/11.01 gives 404 (and I think always did), so perhaps, considering #2837 this is not an ideal schemaVersion candidate either?

Is it possible to include such a @id self-declaring version in the other downloads, or is there a risk this version identifier also disappear from the .nt download later?

Metadata

Metadata

Assignees

No one assigned

    Labels

    no-issue-activityDiscuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions