{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmithdemos/google-api-java-client/issues/369","labels_url":"https://api.github.com/repos/chrsmithdemos/google-api-java-client/issues/369/labels{/name}","comments_url":"https://api.github.com/repos/chrsmithdemos/google-api-java-client/issues/369/comments","events_url":"https://api.github.com/repos/chrsmithdemos/google-api-java-client/issues/369/events","html_url":"https://github.com/chrsmithdemos/google-api-java-client/issues/369","id":59552007,"number":369,"title":"Enforce Discovery pattern constraint for string parameters ","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmithdemos/google-api-java-client/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmithdemos/google-api-java-client/labels/Milestone-Version1.8.0","name":"Milestone-Version1.8.0","color":"ededed"},{"url":"https://api.github.com/repos/chrsmithdemos/google-api-java-client/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/chrsmithdemos/google-api-java-client/labels/Type-Enhancement","name":"Type-Enhancement","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-02T21:16:48Z","updated_at":"2015-03-02T21:16:50Z","closed_at":"2015-03-02T21:16:48Z","body":"```\nExternal references, such as a standards document, or specification?\n\nhttp://code.google.com/apis/discovery/v1/reference.html\nhttps://www.googleapis.com/discovery/v1/apis/plus/v1/rest\n\nJava environments (e.g. Java 6, Android 2.3, App Engine, or All)?\n\nAll\n\nPlease describe the feature requested.\n\nExample from Google+ API (though applies to any Google API):\n\nget: {\nid: \"plus.people.get\",\npath: \"people/{userId}\",\nhttpMethod: \"GET\",\ndescription: \"Get a person's profile.\",\nparameters: {\nuserId: {\ntype: \"string\",\ndescription: \"The ID of the person to get the profile for. The special value \n\"me\" can be used to indicate the authenticated user.\",\nrequired: true,\npattern: \"me|[0-9]+\",\nlocation: \"path\"\n}\n},\nparameterOrder: [\n\"userId\"\n],\nresponse: {\n$ref: \"Person\"\n},\nscopes: [\n\"https://www.googleapis.com/auth/plus.me\"\n]\n},\n\nNote the \"pattern\" on the \"userId\" parameter.  This is a \njava.util.regex.Pattern regular expression that is actually enforced by \nGoogle's servers.  Thus, we should be able to enforce this constraint by \nthrowing an IllegalArgumentException if the specified parameter does not match \nthe Discovery pattern.\n```\n\nOriginal issue reported on code.google.com by `yan...@google.com` on 8 Dec 2011 at 1:48"},"comment":{"url":"https://api.github.com/repos/chrsmithdemos/google-api-java-client/issues/comments/76825598","html_url":"https://github.com/chrsmithdemos/google-api-java-client/issues/369#issuecomment-76825598","issue_url":"https://api.github.com/repos/chrsmithdemos/google-api-java-client/issues/369","id":76825598,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T21:16:50Z","updated_at":"2015-03-02T21:16:50Z","body":"```\nAlmost fixed.  You just missed my second comment: \n\n\"We might also want to provide a way to suppress this runtime check.  One use \ncase is if there is a bug in the pattern and it is fixed in the server, but the \nuser is unable to update to a newer version of the client library.\"\n```\n\nOriginal comment by `yan...@google.com` on 4 Jul 2012 at 2:29\n* Changed state: **Accepted**"}}