Schema.NET icon indicating copy to clipboard operation
Schema.NET copied to clipboard

Add metadata for Schema.org Version

Open Turnerj opened this issue 4 years ago • 2 comments

Describe the feature

I'm not 100% sure we actually get this from our data source but it would be nice having a program-accessible constant that refers to the Schema.org version that the code is currently using.

Turnerj avatar May 03 '20 14:05 Turnerj

Decent idea. It might be in one of the two JSON files we request.

RehanSaeed avatar May 03 '20 16:05 RehanSaeed

With our request to https://schema.org/version/latest/all-layers.jsonld, the @id property (currently) contains "https://schema.org/#8.0" so getting the version isn't too hard.

To get the version without a second HTTP request might be harder due to how the code in the tool handles the result - its designed to pass back only the schema classes.

Might need to think a little more about how I want to approach it. I know I've wanted to restructure the tool a bit to make working on it a little easier but I didn't want to overlap with potentially changing how the tool generates the classes (as like we've discussed before, source generators in .NET 5 might be the path forward).

Turnerj avatar May 04 '20 04:05 Turnerj