Skip to content

allergies: Make exercise schema-compliant #628

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

Merged
merged 2 commits into from
Mar 7, 2017
Merged

allergies: Make exercise schema-compliant #628

merged 2 commits into from
Mar 7, 2017

Conversation

rbasso
Copy link
Contributor

@rbasso rbasso commented Mar 6, 2017

Related to #625.

"cases": [
{
"description": "allergicTo",
"comments": [
Copy link
Contributor

Choose a reason for hiding this comment

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

Am I misreading the spec, or doesn't comments go at the top level?

      "canonicalData":
          { "description": "This is the top-level file structure"
          , "type"       : "object"
          , "required"   : ["exercise" , "version", "cases"]
          , "properties" :
                { "exercise" : { "$ref": "#/definitions/exercise"  }
                , "version"  : { "$ref": "#/definitions/version"   }
                , "comments" : { "$ref": "#/definitions/comments"  }
                , "cases"    : { "$ref": "#/definitions/testGroup" }
                }
          , "additionalProperties": false
          },

Copy link
Contributor Author

@rbasso rbasso Mar 6, 2017

Choose a reason for hiding this comment

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

We can have comments in the top level, in a test group, or inside a test, so that people can keep them where they fit better. In this case, it is in the test group because it pertains just that group of test.

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense, thanks

@kotp
Copy link
Member

kotp commented Mar 7, 2017

@rbasso is this diving into the "more than just formatting and compliance"?

@rbasso
Copy link
Contributor Author

rbasso commented Mar 7, 2017

@rbasso is this diving into the "more than just formatting and compliance"?

This PR was not supposed to cross that line, @kotp. What is the offending part?

@kotp
Copy link
Member

kotp commented Mar 7, 2017

At first glance it appears it is grouping expectations in a different way. I will look closer though.

@rbasso
Copy link
Contributor Author

rbasso commented Mar 7, 2017

I was forced to move the description to comments, because one of them was a list of strings. This also forced me to add other descriptions, because the schema doesn't allow test groups without descriptions (they wouldn't make sense for the student)

@kotp kotp merged commit 07cfa44 into exercism:master Mar 7, 2017
@kotp
Copy link
Member

kotp commented Mar 7, 2017

That now makes sense.

@rbasso rbasso deleted the allergies-schema branch March 7, 2017 08:14
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.

3 participants