Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Schema Validator always gives an error in the license field #91

Open
andyp6 opened this issue Sep 15, 2017 · 5 comments
Open

JSON Schema Validator always gives an error in the license field #91

andyp6 opened this issue Sep 15, 2017 · 5 comments

Comments

@andyp6
Copy link
Contributor

andyp6 commented Sep 15, 2017

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"]

@miaoqi
Copy link
Contributor

miaoqi commented Sep 15, 2017

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"]"

@andyp6
Copy link
Contributor Author

andyp6 commented Sep 16, 2017

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.

@KelSolaar
Copy link
Contributor

KelSolaar commented Sep 18, 2017

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.

@andyp6
Copy link
Contributor Author

andyp6 commented Sep 19, 2017

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

@KelSolaar
Copy link
Contributor

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

KelSolaar referenced this issue Oct 12, 2017
Using the provided schema in the JSON Schema Validator gives a single error. 'License' type is expected to be a string, however a license may not necessarily be issued or needed. Changing the type to String/Null allows for either option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants