{"action":"created","issue":{"url":"https://api.github.com/repos/json-schema-org/json-schema-spec/issues/542","repository_url":"https://api.github.com/repos/json-schema-org/json-schema-spec","labels_url":"https://api.github.com/repos/json-schema-org/json-schema-spec/issues/542/labels{/name}","comments_url":"https://api.github.com/repos/json-schema-org/json-schema-spec/issues/542/comments","events_url":"https://api.github.com/repos/json-schema-org/json-schema-spec/issues/542/events","html_url":"https://github.com/json-schema-org/json-schema-spec/issues/542","id":291278428,"node_id":"MDU6SXNzdWUyOTEyNzg0Mjg=","number":542,"title":"Add Defined Format: UUID","user":{"login":"JLLeitschuh","id":1323708,"node_id":"MDQ6VXNlcjEzMjM3MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/1323708?v=4","gravatar_id":"","url":"https://api.github.com/users/JLLeitschuh","html_url":"https://github.com/JLLeitschuh","followers_url":"https://api.github.com/users/JLLeitschuh/followers","following_url":"https://api.github.com/users/JLLeitschuh/following{/other_user}","gists_url":"https://api.github.com/users/JLLeitschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/JLLeitschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JLLeitschuh/subscriptions","organizations_url":"https://api.github.com/users/JLLeitschuh/orgs","repos_url":"https://api.github.com/users/JLLeitschuh/repos","events_url":"https://api.github.com/users/JLLeitschuh/events{/privacy}","received_events_url":"https://api.github.com/users/JLLeitschuh/received_events","type":"User","site_admin":false},"labels":[{"id":603983394,"node_id":"MDU6TGFiZWw2MDM5ODMzOTQ=","url":"https://api.github.com/repos/json-schema-org/json-schema-spec/labels/format","name":"format","color":"006b75","default":false},{"id":692894930,"node_id":"MDU6TGFiZWw2OTI4OTQ5MzA=","url":"https://api.github.com/repos/json-schema-org/json-schema-spec/labels/validation","name":"validation","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-01-24T16:43:11Z","updated_at":"2019-01-04T08:59:40Z","closed_at":null,"author_association":"NONE","body":"The UUID format is covered in [RFC 4122](https://tools.ietf.org/html/rfc4122). This standard could be a very simple addition to the default set of Defined Formats that JSON schema comes built in with.\r\n\r\nThere is a standard format that could be encoded as a pattern: https://en.wikipedia.org/wiki/Universally_unique_identifier#Format\r\n\r\nSomething like the following would work:\r\n```\r\n^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$\r\n```"},"comment":{"url":"https://api.github.com/repos/json-schema-org/json-schema-spec/issues/comments/451388430","html_url":"https://github.com/json-schema-org/json-schema-spec/issues/542#issuecomment-451388430","issue_url":"https://api.github.com/repos/json-schema-org/json-schema-spec/issues/542","id":451388430,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTM4ODQzMA==","user":{"login":"gpakosz","id":553208,"node_id":"MDQ6VXNlcjU1MzIwOA==","avatar_url":"https://avatars3.githubusercontent.com/u/553208?v=4","gravatar_id":"","url":"https://api.github.com/users/gpakosz","html_url":"https://github.com/gpakosz","followers_url":"https://api.github.com/users/gpakosz/followers","following_url":"https://api.github.com/users/gpakosz/following{/other_user}","gists_url":"https://api.github.com/users/gpakosz/gists{/gist_id}","starred_url":"https://api.github.com/users/gpakosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpakosz/subscriptions","organizations_url":"https://api.github.com/users/gpakosz/orgs","repos_url":"https://api.github.com/users/gpakosz/repos","events_url":"https://api.github.com/users/gpakosz/events{/privacy}","received_events_url":"https://api.github.com/users/gpakosz/received_events","type":"User","site_admin":false},"created_at":"2019-01-04T08:59:40Z","updated_at":"2019-01-04T08:59:40Z","author_association":"NONE","body":"Hello I landed here as I'm learning JSON Schema and I want to represent a field in a document that's a UUID v4.\r\n\r\nI'm ready to extend https://pypi.org/project/jsonschema/ to add support for it. However, after reading this discussion, I'm not sure what's the recommend way to represent UUIDs.\r\n\r\nThe documents will be of the form\r\n```\r\n{\r\n  \"id\": \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\",\r\n  ...\r\n}\r\n```\r\n\r\nIs there now an official stance? Should it be what OpenAPI suggests?\r\n```\r\n{\r\n  \"type\": \"string\",\r\n  \"format\": \"uuid\"\r\n}\r\n```\r\nOr something else?\r\n\r\nAlso, I'm not sure it's desirable to have `\"urn:uuid:xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\"` in our JSON documents. It's mostly always going to be strings.\r\n\r\nCan someone please shed some light?"}}
{"actor":{"display_login":"gpakosz"}}