rawtoaces icon indicating copy to clipboard operation
rawtoaces copied to clipboard

JSON Schema Validator always gives an error in the license field

Open andyp6 opened this issue 8 years ago • 5 comments

I get a Null/String error for the 'license' field when validating JSON with custom and the provided specsens data. It can be ignored but obviously is not validating.

Message: Invalid type. Expected String but got Null. Schema path: properties/header/properties/license#/type

Maybe the field type should be:

"type": ["string", "null"]

andyp6 avatar Sep 15 '17 14:09 andyp6

Hi, thanks for the feedback. I went to these two site:

  1. https://jsonlint.com/
  2. https://jsonformatter.curiousconcept.com/

It looks our current schema and values are valid.

@KelSolaar Hi Thomas, can you take a look? maybe we should need to change it to ""type": ["string", "null"]"

miaoqi avatar Sep 15 '17 17:09 miaoqi

I've opened a pull request for this as a license to use spec sens data doesn't appear to be mandatory and I can't see any potential issues.

andyp6 avatar Sep 16 '17 13:09 andyp6

Sorry for missing that one!

I would argue that putting a license is mandatory at least from a technical perspective. The first thing a company does when using public open source software (or data) is usually to check the license in order to know if the software can be used. If a software has no license, it is typically avoided like highly dangerous plague :)

That was the thinking for having the license property mandatory.

KelSolaar avatar Sep 18 '17 23:09 KelSolaar

I don't disagree :)

I was looking at it from the perspective of current JSON, non of which specifies a license and therefore does not validate using the schema provided in README.md

andyp6 avatar Sep 19 '17 00:09 andyp6

I think we talked about it already on Slack. Dragging @aforsythe to the convo as it is important :)

KelSolaar avatar Sep 19 '17 04:09 KelSolaar