ElixirTeSS / TeSS

Training e-Support Service using Ruby on Rails.
Other
12 stars 13 forks source link

Missing @context and @type embed in JSON-LD microdata for Events & Materials #451

Closed susheel closed 7 years ago

susheel commented 7 years ago

I presume appending .json to a TeSS endpoint is the correct way to obtain a (Bio)Schema annotated data from TeSS. However the returned json are missing the context and type keys. See JSON-LD Materials and Events

Example steps to reproduce:

  1. Navigate to example endpoint: https://tess.elixir-europe.org/events/introduction-to-high-throughput-screening-2-ects.json
  2. Missing @context and @type keys in returned json.

I think the following keys should be present: Events - {"@context": "http://schema.org/","@type": "Event", ...} Materials - {"@context": "http://schema.org/","@type": "creativeWork", ...}

I'm not sure about Packages, Workflows etc.

njall commented 7 years ago

The JSON endpoints just display all the fields we have for that record in JSON format.

The schema.org stuff is embedded within the HTML endpoints. The schema.org needs to travel with the HTML so that search engines can tell from the schema.org what the page is about.

If you run our HTML pages through Google structured data testing tool you'll see the schema.org is in there but in microdata format e.g. https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Ftess.elixir-europe.org%2Fmaterials%2Fadmin-corner-galaxy-database-schema

susheel commented 7 years ago

Ah I see, I presumed wrong! :) I thought the JSON API too used the Schema.org spec :)

Curiously, I'm guessing in the Event example: TeSS Link, Original Link, the event description is missing because the scraper failed to detect the description in the original link; Which of course we really cannot control :)