Schema.NET
Schema.NET copied to clipboard
Add metadata for Schema.org Version
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.
Decent idea. It might be in one of the two JSON files we request.
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).