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

Fix invalid array syntax in json schema #3097

Merged
merged 2 commits into from
Jun 8, 2021

Conversation

jenshnielsen
Copy link
Collaborator

@jenshnielsen jenshnielsen commented Jun 8, 2021

The current format is invalid. It should either be just a single item type or like this pr suggest a list of item types which defines exactly the type of each element

Since cutoff_percentile always has two numbers this seems like the correct format.

See https://json-schema.org/understanding-json-schema/reference/array.html for some details

This also adds a pre-commit hook that check that json is valid which would have caught this. I had to exclude asv.conf.json since it contains comments which is not valid json

@codecov
Copy link

codecov bot commented Jun 8, 2021

Codecov Report

Merging #3097 (a77a421) into master (3114b59) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3097   +/-   ##
=======================================
  Coverage   65.65%   65.65%           
=======================================
  Files         216      216           
  Lines       28746    28746           
=======================================
  Hits        18874    18874           
  Misses       9872     9872           

@jenshnielsen jenshnielsen changed the title Fix invalid array in json schema Fix invalid array syntax in json schema Jun 8, 2021
Copy link
Contributor

@astafan8 astafan8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch!

@astafan8 astafan8 merged commit a7ce73a into microsoft:master Jun 8, 2021
@jenshnielsen jenshnielsen deleted the fix_json_array branch June 8, 2021 19:57
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

Successfully merging this pull request may close these issues.

None yet

2 participants