{"action":"created","issue":{"url":"https://api.github.com/repos/uber-hypermedia/specification/issues/34","labels_url":"https://api.github.com/repos/uber-hypermedia/specification/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/uber-hypermedia/specification/issues/34/comments","events_url":"https://api.github.com/repos/uber-hypermedia/specification/issues/34/events","html_url":"https://github.com/uber-hypermedia/specification/issues/34","id":86346716,"number":34,"title":"Clarify documentation of the model property","user":{"login":"thomaseizinger","id":5486389,"avatar_url":"https://avatars.githubusercontent.com/u/5486389?v=3","gravatar_id":"","url":"https://api.github.com/users/thomaseizinger","html_url":"https://github.com/thomaseizinger","followers_url":"https://api.github.com/users/thomaseizinger/followers","following_url":"https://api.github.com/users/thomaseizinger/following{/other_user}","gists_url":"https://api.github.com/users/thomaseizinger/gists{/gist_id}","starred_url":"https://api.github.com/users/thomaseizinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomaseizinger/subscriptions","organizations_url":"https://api.github.com/users/thomaseizinger/orgs","repos_url":"https://api.github.com/users/thomaseizinger/repos","events_url":"https://api.github.com/users/thomaseizinger/events{/privacy}","received_events_url":"https://api.github.com/users/thomaseizinger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-08T21:56:30Z","updated_at":"2015-06-10T13:03:28Z","closed_at":null,"body":"Currently, the specification states the following for the model property:\r\n\r\n`Contains an [RFC6570]-compliant string to be used to construct message bodies. Variables in UBER model strings SHOULD be resolved using the values from name properties, but MAY come from any source available to the client application.`\r\n\r\nDoes this mean that the server can provide default values for variables in the uri-template by including child data elements with matching name properties? Something like the following:\r\n\r\n    <data \r\n        name=\"create\"\r\n        rel=\"http://example.org/rels/create\"\r\n        url=\"http://example.org/people/\"\r\n        model=\"g={givenName}&f={familyName}&e={email}&a={avatarUrl}\"\r\n        action=\"append\">\r\n        <data name=\"avatarUrl\">\r\n            http://example.org/defaultAvatar.png\r\n        </data>\r\n    </data>\r\n\r\nIs this also possible for templated URLs?\r\n\r\n    <data \r\n        name=\"search\"\r\n        rel=\"http://example.org/rels/search\"\r\n        url=\"http://example.org/search/(?query,pageSize)\"\r\n        action=\"read\">\r\n        <data name=\"pageSize\">10</data>\r\n    </data>\r\n\r\nI think the specification needs to clarified for these usecases. Also, if the latter is not intended at the moment, I think it would be a reasonable feature request."},"comment":{"url":"https://api.github.com/repos/uber-hypermedia/specification/issues/comments/110743028","html_url":"https://github.com/uber-hypermedia/specification/issues/34#issuecomment-110743028","issue_url":"https://api.github.com/repos/uber-hypermedia/specification/issues/34","id":110743028,"user":{"login":"thomaseizinger","id":5486389,"avatar_url":"https://avatars.githubusercontent.com/u/5486389?v=3","gravatar_id":"","url":"https://api.github.com/users/thomaseizinger","html_url":"https://github.com/thomaseizinger","followers_url":"https://api.github.com/users/thomaseizinger/followers","following_url":"https://api.github.com/users/thomaseizinger/following{/other_user}","gists_url":"https://api.github.com/users/thomaseizinger/gists{/gist_id}","starred_url":"https://api.github.com/users/thomaseizinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomaseizinger/subscriptions","organizations_url":"https://api.github.com/users/thomaseizinger/orgs","repos_url":"https://api.github.com/users/thomaseizinger/repos","events_url":"https://api.github.com/users/thomaseizinger/events{/privacy}","received_events_url":"https://api.github.com/users/thomaseizinger/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T13:03:28Z","updated_at":"2015-06-10T13:03:28Z","body":"FYI:\r\nI have published my current work on the client library here:\r\nhttps://github.com/rauber-projects/rauber-client\r\n\r\nThe default-value parsing for the model-string is implemented here:\r\nhttps://github.com/rauber-projects/rauber-client/blob/master/src/main/java/org/rauber/action/content/UrlEncodedContentCreator.java\r\n\r\nYou can see it in action in the following unit-test:\r\nhttps://github.com/rauber-projects/rauber-client/blob/master/src/test/java/org/rauber/action/content/UrlEncodedContentCreatorTest.java\r\n\r\nI am looking forward to your feedback on the implementation :)"}}