manton / JSONFeed

The JSONFeed.org website
Creative Commons Zero v1.0 Universal
940 stars 54 forks source link

Online feed validator #82

Closed seriousme closed 6 years ago

seriousme commented 7 years ago

Hi,

I have created a proof of concept of an online feed validator at: https://github.com/seriousme/jsonfeedvalidator Based on the discussion in #80 I have assumed that the schema hosted at http://schemastore.org/json/ is the "official" schema.

Github only allows https hosting and both https://schemastore.org and https://json-schema.org/ have invalid certificates (CN's don't match domains) :-( To circumvent this I have:

Validation of a feed by URL can easily be added, however this requires either:

KR, Hans

manton commented 7 years ago

Thanks @seriousme. There have been a couple attempts at starting a validator, and I think we'll likely have an official one that is hosted off of jsonfeed.org well. (I prototyped one but it needs some more work.)

I've seen at least 2 schemas and I'm not sure that one is really the "official" one yet. I'd love to see some consensus from the community on that. I haven't looked closely enough at the schemas to know which one is best or if differences can be merged to create a more complete version.

seriousme commented 7 years ago

Well, feel free to clone/adapt/modify/ignore my validator as soon as the schema issue has been sorted.

14 is based on draft-06 of the core spec and #21 is based on draft-04 (which is easy to convert to draft-06 using ajv-cli)

Glancing over #14 and #21 the #21 looks a bit more elaborate. But then again, I'm just passing by..

sonicdoe commented 7 years ago

On the topic of validators, I have also started writing a validator at sonicdoe/jsonfeed-validator. I started out with my existing JSON schema but already added (and plan to add more) rules which cannot be validated using JSON Schema (for example, the uniqueness of item IDs and the Content-Type header).

I've seen at least 2 schemas and I'm not sure that one is really the "official" one yet. I'd love to see some consensus from the community on that. I haven't looked closely enough at the schemas to know which one is best or if differences can be merged to create a more complete version.

I welcome the idea of an official JSON schema on jsonfeed.org. I’ll take a closer look at @madskristensen schema and give a merged version a try. It might then make sense to discuss any differences in a separate issue as to keep this one focused on validators.

manton commented 7 years ago

Thanks @sonicdoe. I like your rule-based approach for adding more checks that can't be caught by just validating the schema.

I've been tinkering with a validator as well, and an early version is now online at: http://validator.jsonfeed.org/ (source is https://github.com/manton/jsonfeed-validator)

More work is needed here, including finishing the discussion about the schema. But hopefully useful as a first check of feeds that are appearing in the wild.

manton commented 6 years ago

While there hasn't been any new work done on the validator recently, it's still useful as-is to catch problems in feeds. I'm going to close this out for now.