{"action":"created","issue":{"url":"https://api.github.com/repos/dataprotocols/dataprotocols/issues/167","labels_url":"https://api.github.com/repos/dataprotocols/dataprotocols/issues/167/labels{/name}","comments_url":"https://api.github.com/repos/dataprotocols/dataprotocols/issues/167/comments","events_url":"https://api.github.com/repos/dataprotocols/dataprotocols/issues/167/events","html_url":"https://github.com/dataprotocols/dataprotocols/issues/167","id":59272021,"number":167,"title":"[jts] Required in constraints defaults to true","user":{"login":"rgrp","id":180658,"avatar_url":"https://avatars.githubusercontent.com/u/180658?v=3","gravatar_id":"","url":"https://api.github.com/users/rgrp","html_url":"https://github.com/rgrp","followers_url":"https://api.github.com/users/rgrp/followers","following_url":"https://api.github.com/users/rgrp/following{/other_user}","gists_url":"https://api.github.com/users/rgrp/gists{/gist_id}","starred_url":"https://api.github.com/users/rgrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgrp/subscriptions","organizations_url":"https://api.github.com/users/rgrp/orgs","repos_url":"https://api.github.com/users/rgrp/repos","events_url":"https://api.github.com/users/rgrp/events{/privacy}","received_events_url":"https://api.github.com/users/rgrp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dataprotocols/dataprotocols/labels/spec-json-table-schema","name":"spec-json-table-schema","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-27T18:02:56Z","updated_at":"2015-03-03T10:12:37Z","closed_at":null,"body":"At the moment to use JTS to indicate a field / column is required one does:\r\n\r\n```\r\nconstraints: {\r\n required: true\r\n}\r\n```\r\n\r\nThis has implication that default is false. I think we should invert and have that presence in schema implies that presence is required and that one would put required: false to indicate that it was optional (does suggest we may want to rename `required` to `optional` or something ...)"},"comment":{"url":"https://api.github.com/repos/dataprotocols/dataprotocols/issues/comments/76919186","html_url":"https://github.com/dataprotocols/dataprotocols/issues/167#issuecomment-76919186","issue_url":"https://api.github.com/repos/dataprotocols/dataprotocols/issues/167","id":76919186,"user":{"login":"pwalsh","id":791678,"avatar_url":"https://avatars.githubusercontent.com/u/791678?v=3","gravatar_id":"","url":"https://api.github.com/users/pwalsh","html_url":"https://github.com/pwalsh","followers_url":"https://api.github.com/users/pwalsh/followers","following_url":"https://api.github.com/users/pwalsh/following{/other_user}","gists_url":"https://api.github.com/users/pwalsh/gists{/gist_id}","starred_url":"https://api.github.com/users/pwalsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwalsh/subscriptions","organizations_url":"https://api.github.com/users/pwalsh/orgs","repos_url":"https://api.github.com/users/pwalsh/repos","events_url":"https://api.github.com/users/pwalsh/events{/privacy}","received_events_url":"https://api.github.com/users/pwalsh/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T10:12:37Z","updated_at":"2015-03-03T10:12:37Z","body":"@rgrp I'll submit a pull request for this once we finalise the pending pull request.\r\n\r\nAs a side note (I can open another issue if you think there is a reason to discuss it):\r\n\r\nWhy do we have a nested constraints object? \r\n\r\nFrom one perspective, **everything** in a field descriptor is a \"constraint\" or (type, format, etc.), and I don't see why `field.type` but `field.constraints.required` (when `field.required`) would do the same job and just as clearly. Maybe we are gaining something from this but I don't see what it is."}}