)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b28b74185fe46ed2bf22d00002c9aed7b082c491","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Relax the schema validation to accept empty request body"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The API such as region creation allows empty request body (a"},{"line_number":10,"context_line":"random UUID will be generated as the region in this case)."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"jsonschema will allow an empty request body to be passed if"},{"line_number":13,"context_line":"don\u0027t specify `required` element as what region creation is"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a68dd71_05d197cd","line":10,"range":{"start_line":10,"start_character":37,"end_line":10,"end_character":43},"updated":"2016-01-20 18:40:45.000000000","message":"nit: region ID*","commit_id":"9e96b3072f8517e344f2a49f836aba544adf8634"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"aef8a1c36c85759b0703c8eaa7f44e5aab7463db","unresolved":false,"context_lines":[{"line_number":10,"context_line":"random UUID will be generated as the region in this case)."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"jsonschema will allow an empty request body to be passed if"},{"line_number":13,"context_line":"don\u0027t specify `required` element as what region creation is"},{"line_number":14,"context_line":"defined in schema definition."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The patch relax the schema validation to accept empty request"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"7a5de9d1_1bd8d31c","line":13,"updated":"2016-01-28 21:31:55.000000000","message":"change \"don\u0027t\" to \"the user doesn\u0027t\"","commit_id":"63a0a3cb2a5972451a570704f6e26404cfea1d39"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"aef8a1c36c85759b0703c8eaa7f44e5aab7463db","unresolved":false,"context_lines":[{"line_number":13,"context_line":"don\u0027t specify `required` element as what region creation is"},{"line_number":14,"context_line":"defined in schema definition."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The patch relax the schema validation to accept empty request"},{"line_number":17,"context_line":"body, so that the API such as region creation can pass the"},{"line_number":18,"context_line":"validation and could be created successfully."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"7a5de9d1_bb2c1f03","line":16,"range":{"start_line":16,"start_character":41,"end_line":16,"end_character":53},"updated":"2016-01-28 21:31:55.000000000","message":"change to \"accept an empty\"","commit_id":"63a0a3cb2a5972451a570704f6e26404cfea1d39"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"aef8a1c36c85759b0703c8eaa7f44e5aab7463db","unresolved":false,"context_lines":[{"line_number":13,"context_line":"don\u0027t specify `required` element as what region creation is"},{"line_number":14,"context_line":"defined in schema definition."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The patch relax the schema validation to accept empty request"},{"line_number":17,"context_line":"body, so that the API such as region creation can pass the"},{"line_number":18,"context_line":"validation and could be created successfully."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"7a5de9d1_3bfa6f76","line":16,"range":{"start_line":16,"start_character":10,"end_line":16,"end_character":15},"updated":"2016-01-28 21:31:55.000000000","message":"change to \"relaxes\"","commit_id":"63a0a3cb2a5972451a570704f6e26404cfea1d39"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"aef8a1c36c85759b0703c8eaa7f44e5aab7463db","unresolved":false,"context_lines":[{"line_number":14,"context_line":"defined in schema definition."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The patch relax the schema validation to accept empty request"},{"line_number":17,"context_line":"body, so that the API such as region creation can pass the"},{"line_number":18,"context_line":"validation and could be created successfully."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: If3dd49af5e16bb3b741efa4573f9f8e9085ddd14"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"7a5de9d1_7b36a753","line":17,"range":{"start_line":17,"start_character":55,"end_line":17,"end_character":58},"updated":"2016-01-28 21:31:55.000000000","message":"remove \"the\"","commit_id":"63a0a3cb2a5972451a570704f6e26404cfea1d39"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"aef8a1c36c85759b0703c8eaa7f44e5aab7463db","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The patch relax the schema validation to accept empty request"},{"line_number":17,"context_line":"body, so that the API such as region creation can pass the"},{"line_number":18,"context_line":"validation and could be created successfully."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: If3dd49af5e16bb3b741efa4573f9f8e9085ddd14"},{"line_number":21,"context_line":"Closes-Bug: #1501740"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"7a5de9d1_9b392344","line":18,"range":{"start_line":18,"start_character":15,"end_line":18,"end_character":20},"updated":"2016-01-28 21:31:55.000000000","message":"change to \"can\"","commit_id":"63a0a3cb2a5972451a570704f6e26404cfea1d39"}],"keystone/catalog/controllers.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"dc3a3c4fe037b3c692f1d69a758870edb0cd2b10","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        return self.create_region(context, region)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    @controller.protected()"},{"line_number":220,"context_line":"    @validation.validated(schema.region_create, \u0027region\u0027, allow_empty\u003dTrue)"},{"line_number":221,"context_line":"    def create_region(self, context, region\u003dNone):"},{"line_number":222,"context_line":"        ref \u003d {}"},{"line_number":223,"context_line":"        if region:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_45743fce","line":220,"updated":"2015-10-27 01:14:04.000000000","message":"whether the body can be empty or not should be a property of the schema, we don\u0027t need another parameter.","commit_id":"601930d3086c1645af0981076e2f70955af55ab7"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"dc3a3c4fe037b3c692f1d69a758870edb0cd2b10","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    @controller.protected()"},{"line_number":220,"context_line":"    @validation.validated(schema.region_create, \u0027region\u0027, allow_empty\u003dTrue)"},{"line_number":221,"context_line":"    def create_region(self, context, region\u003dNone):"},{"line_number":222,"context_line":"        ref \u003d {}"},{"line_number":223,"context_line":"        if region:"},{"line_number":224,"context_line":"            ref \u003d self._normalize_dict(region)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_85481789","line":221,"updated":"2015-10-27 01:14:04.000000000","message":"the region is still required. It should be passed as an empty dict if the client does \"region\": {}. If the caller isn\u0027t doing that then the caller is wrong, not this code.","commit_id":"601930d3086c1645af0981076e2f70955af55ab7"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"af6c766957fbfd9e91b5e932e20767f45eec671d","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    @controller.protected()"},{"line_number":220,"context_line":"    @validation.validated(schema.region_create, \u0027region\u0027, allow_empty\u003dTrue)"},{"line_number":221,"context_line":"    def create_region(self, context, region\u003dNone):"},{"line_number":222,"context_line":"        ref \u003d {}"},{"line_number":223,"context_line":"        if region:"},{"line_number":224,"context_line":"            ref \u003d self._normalize_dict(region)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_5e31d958","line":221,"in_reply_to":"1a26ad4f_a2a7694e","updated":"2016-01-06 19:15:42.000000000","message":"We should allow empty body as we\u0027ve already establish that in v2.0. So we would break backward compatibility if we dont\u0027. I think what Brant is saying is that we don\u0027t need the \"allow_empty\u003dTrue\" here. We need to do that in schema.py and validator.py. For example,\n\n  region_create \u003d {\n    \u0027type\u0027: \u0027object\u0027,\n    \u0027properties\u0027: _region_properties,\n    \u0027additionalProperties\u0027: True,\n    \u0027allowEmpty\u0027: True\n  }","commit_id":"601930d3086c1645af0981076e2f70955af55ab7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"5ff2ec9e28b57578f450809e447e9599a650d9c4","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    @controller.protected()"},{"line_number":220,"context_line":"    @validation.validated(schema.region_create, \u0027region\u0027, allow_empty\u003dTrue)"},{"line_number":221,"context_line":"    def create_region(self, context, region\u003dNone):"},{"line_number":222,"context_line":"        ref \u003d {}"},{"line_number":223,"context_line":"        if region:"},{"line_number":224,"context_line":"            ref \u003d self._normalize_dict(region)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_c04efd95","line":221,"in_reply_to":"3a29b11f_85481789","updated":"2015-10-27 01:55:18.000000000","message":"what\u0027s the difference between client does \"region\": {} and no body is given? Should there is an rule that body must be given for creating API?","commit_id":"601930d3086c1645af0981076e2f70955af55ab7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"f0323855e139ff8c9adb411fca2dc0aae0f578bc","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    @controller.protected()"},{"line_number":220,"context_line":"    @validation.validated(schema.region_create, \u0027region\u0027, allow_empty\u003dTrue)"},{"line_number":221,"context_line":"    def create_region(self, context, region\u003dNone):"},{"line_number":222,"context_line":"        ref \u003d {}"},{"line_number":223,"context_line":"        if region:"},{"line_number":224,"context_line":"            ref \u003d self._normalize_dict(region)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_a2a7694e","line":221,"in_reply_to":"3a29b11f_c04efd95","updated":"2015-10-28 02:10:23.000000000","message":"so, per my understanding, if you accept the emtpy body like this, there is no reason we don\u0027t accept the case when the request body is not given at all.","commit_id":"601930d3086c1645af0981076e2f70955af55ab7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"26051e966d4205182f9bf941779ea912530fc12f","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    @controller.protected()"},{"line_number":220,"context_line":"    @validation.validated(schema.region_create, \u0027region\u0027, allow_empty\u003dTrue)"},{"line_number":221,"context_line":"    def create_region(self, context, region\u003dNone):"},{"line_number":222,"context_line":"        ref \u003d {}"},{"line_number":223,"context_line":"        if region:"},{"line_number":224,"context_line":"            ref \u003d self._normalize_dict(region)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_5cfb6f7b","line":221,"in_reply_to":"fa69d971_249bb267","updated":"2016-01-11 03:53:34.000000000","message":"@Brant, Guang, I understand your concern and I understand your approach to address this issue.\n\nThe problem is current code logic will not allow empty request body since the bug and fixing from Liberty.\n\npls see: https://review.openstack.org/#/c/195903/\n\n\nAlso, pls check the current code logic, https://github.com/openstack/keystone/blob/master/keystone/common/validation/__init__.py#L57-L65\n\n\nI am happy to revert the change from liberty if you agree the fixing in the liberty is not correct enough and there should be some trade-off between the un-helpful message thrown from jsonchema and the leverage of the allow empty ability from jsonschema.","commit_id":"601930d3086c1645af0981076e2f70955af55ab7"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"949b87e746e928bbd33f559d9143a11ecfc01631","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    @controller.protected()"},{"line_number":220,"context_line":"    @validation.validated(schema.region_create, \u0027region\u0027, allow_empty\u003dTrue)"},{"line_number":221,"context_line":"    def create_region(self, context, region\u003dNone):"},{"line_number":222,"context_line":"        ref \u003d {}"},{"line_number":223,"context_line":"        if region:"},{"line_number":224,"context_line":"            ref \u003d self._normalize_dict(region)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_249bb267","line":221,"in_reply_to":"fa69d971_5e31d958","updated":"2016-01-06 19:36:06.000000000","message":"y, like this or maybe turn region_create into an object that has a schema attribute and allow_empty:\n\n region_create \u003d Validation(schema\u003d{\u0027type: \u0027object\u0027, ...}, allow_empty\u003dTrue)","commit_id":"601930d3086c1645af0981076e2f70955af55ab7"}],"keystone/common/validation/__init__.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"9074b001800fd8d7cb7d29fed4e3a55917d5de71","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    API method execution."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    :param request_body_schema: a schema to validate the resource reference"},{"line_number":29,"context_line":"    :param resource_to_validate: the reference to validate"},{"line_number":30,"context_line":"    :raises keystone.exception.ValidationError: if `resource_to_validate` is"},{"line_number":31,"context_line":"            not passed or passed with an empty value but not allowed by the"},{"line_number":32,"context_line":"            API (see wrapper method below)."}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_4802d670","line":29,"updated":"2015-10-20 20:40:18.000000000","message":"update the docstring, add allow_empty","commit_id":"5e4193cd6bc2934af8e662a8b91ca58caba73b5a"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"bd981d49e17ccf4045fc3ca7024cd1d33358ee5d","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    API method execution."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    :param request_body_schema: a schema to validate the resource reference"},{"line_number":29,"context_line":"    :param resource_to_validate: the reference to validate"},{"line_number":30,"context_line":"    :raises keystone.exception.ValidationError: if `resource_to_validate` is"},{"line_number":31,"context_line":"            not passed or passed with an empty value but not allowed by the"},{"line_number":32,"context_line":"            API (see wrapper method below)."}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_bc6ab7ec","line":29,"in_reply_to":"3a29b11f_4802d670","updated":"2015-10-21 09:23:42.000000000","message":"Done","commit_id":"5e4193cd6bc2934af8e662a8b91ca58caba73b5a"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"7109cca28710bd7d6fe786727f6a4cf59e359f7b","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                    # No request body is found or the resource to be validated"},{"line_number":67,"context_line":"                    # is empty but this is allowed in the API, no need to do"},{"line_number":68,"context_line":"                    # validation, any valid request body cannot be here."},{"line_number":69,"context_line":"                    if allow_empty:"},{"line_number":70,"context_line":"                        pass"},{"line_number":71,"context_line":"                    else:"},{"line_number":72,"context_line":"                        raise exception.ValidationError("}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_94b1b503","line":69,"updated":"2015-10-21 17:19:48.000000000","message":"We can change this for something like:\n\nIf not allow_empty: \n    raise: exception.ValidationError \n       (...)\n\nI think that It\u0027s more clear","commit_id":"8ab630d92d50ced1cdee648acfebf237bd725351"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"481ce8d1066864da652f22f610e7550d8b317dd4","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                    # No request body is found or the resource to be validated"},{"line_number":67,"context_line":"                    # is empty but this is allowed in the API, no need to do"},{"line_number":68,"context_line":"                    # validation, any valid request body cannot be here."},{"line_number":69,"context_line":"                    if allow_empty:"},{"line_number":70,"context_line":"                        pass"},{"line_number":71,"context_line":"                    else:"},{"line_number":72,"context_line":"                        raise exception.ValidationError("}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_c61d3563","line":69,"in_reply_to":"3a29b11f_94b1b503","updated":"2015-10-22 02:58:48.000000000","message":"nice catch!","commit_id":"8ab630d92d50ced1cdee648acfebf237bd725351"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"dc3a3c4fe037b3c692f1d69a758870edb0cd2b10","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from keystone.i18n import _"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def validated(request_body_schema, resource_to_validate, allow_empty\u003dFalse):"},{"line_number":23,"context_line":"    \"\"\"Register a schema to validate a resource reference."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    Registered schema will be used for validating a request body just before"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_0555e71b","line":22,"updated":"2015-10-27 01:14:04.000000000","message":"whether the body can be empty or not should be a property of request_body_schema. there shouldn\u0027t be a new parameter to the function for this.","commit_id":"601930d3086c1645af0981076e2f70955af55ab7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"f0323855e139ff8c9adb411fca2dc0aae0f578bc","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from keystone.i18n import _"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def validated(request_body_schema, resource_to_validate, allow_empty\u003dFalse):"},{"line_number":23,"context_line":"    \"\"\"Register a schema to validate a resource reference."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    Registered schema will be used for validating a request body just before"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_a27449fd","line":22,"in_reply_to":"3a29b11f_0555e71b","updated":"2015-10-28 02:10:23.000000000","message":"empty body such as \"region\": {} is not allowed here anymore, which means the body like this \"region\": {} will raise a ValidationError exception from this method without this change.\n\nThis was did since there is a bug [1] complains the message from the jsonschema was not helpful. Its looks like this,\n\ncopy them here as well.\n\nWhen this body is provided:\n{\n   \"service\": {}\n}\n\nyou get this back:\n\n{\n    \"error\": {\n        \"message\": \"{} does not have enough properties\",\n        \"code\": 400,\n        \"title\": \"Bad Request\"\n    }\n}\n\nAnd per the review comments and opinions from different reviewers, we decides to the check it in this method and then we will know what acutally happened [2] [3].\n\nLet\u0027s back to the suggestion from you, this is acutally my inital thoughts about this bug, relax it here to accept an empty request body, but we must put up with the ambiguous error message from jsonschema.\n\nThe comments on this bug (https://bugs.launchpad.net/keystone/+bug/1501740) looks great to me since it avoid the backward compatible issue. And I didn\u0027t see anyting terrible from that suggestion and the implementation of that idea, i.e. this patch.\n\n\n[1] https://bugs.launchpad.net/keystone/+bug/1466872\n\n[2] https://review.openstack.org/#/c/195903/\n\n[3] https://review.openstack.org/#/c/195001/","commit_id":"601930d3086c1645af0981076e2f70955af55ab7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b28b74185fe46ed2bf22d00002c9aed7b082c491","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        @functools.wraps(func)"},{"line_number":50,"context_line":"        def wrapper(*args, **kwargs):"},{"line_number":51,"context_line":"            if resource_to_validate in kwargs:"},{"line_number":52,"context_line":"                schema_validator.validate(kwargs[resource_to_validate])"},{"line_number":53,"context_line":"            else:"},{"line_number":54,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_d837e2e1","line":51,"range":{"start_line":51,"start_character":12,"end_line":51,"end_character":46},"updated":"2016-01-20 18:40:45.000000000","message":"how is this different than the old check?","commit_id":"9e96b3072f8517e344f2a49f836aba544adf8634"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0cc78e785c55c9cc127402afcf9ebc3c95c96d98","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        @functools.wraps(func)"},{"line_number":50,"context_line":"        def wrapper(*args, **kwargs):"},{"line_number":51,"context_line":"            if resource_to_validate in kwargs:"},{"line_number":52,"context_line":"                schema_validator.validate(kwargs[resource_to_validate])"},{"line_number":53,"context_line":"            else:"},{"line_number":54,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_166e99c9","line":51,"range":{"start_line":51,"start_character":12,"end_line":51,"end_character":46},"in_reply_to":"9a68dd71_d837e2e1","updated":"2016-01-21 02:52:19.000000000","message":"so, the condition of kwargs.get(resource_to_validate) will not all the body to be empty, but this change will allow it to be empty.","commit_id":"9e96b3072f8517e344f2a49f836aba544adf8634"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b28b74185fe46ed2bf22d00002c9aed7b082c491","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            else:"},{"line_number":54,"context_line":"                try:"},{"line_number":55,"context_line":"                    resource \u003d args[arg_index]"},{"line_number":56,"context_line":"                    if resource is not None:"},{"line_number":57,"context_line":"                        schema_validator.validate(resource)"},{"line_number":58,"context_line":"                    else:"},{"line_number":59,"context_line":"                        raise exception.ValidationError("}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_784b565a","line":56,"range":{"start_line":56,"start_character":20,"end_line":56,"end_character":44},"updated":"2016-01-20 18:40:45.000000000","message":"We could add a comment here saying that this is what makes us able to validate empty dictionaries.","commit_id":"9e96b3072f8517e344f2a49f836aba544adf8634"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0cc78e785c55c9cc127402afcf9ebc3c95c96d98","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            else:"},{"line_number":54,"context_line":"                try:"},{"line_number":55,"context_line":"                    resource \u003d args[arg_index]"},{"line_number":56,"context_line":"                    if resource is not None:"},{"line_number":57,"context_line":"                        schema_validator.validate(resource)"},{"line_number":58,"context_line":"                    else:"},{"line_number":59,"context_line":"                        raise exception.ValidationError("}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_d6dd6171","line":56,"range":{"start_line":56,"start_character":20,"end_line":56,"end_character":44},"in_reply_to":"9a68dd71_784b565a","updated":"2016-01-21 02:52:19.000000000","message":"L55-57 was added to support internal API call, it will  never happen if call by CURL.","commit_id":"9e96b3072f8517e344f2a49f836aba544adf8634"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"fca55929cb46654ffe5b21b7c82585ebb3017550","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        @functools.wraps(func)"},{"line_number":50,"context_line":"        def wrapper(*args, **kwargs):"},{"line_number":51,"context_line":"            if resource_to_validate in kwargs:"},{"line_number":52,"context_line":"                schema_validator.validate(kwargs[resource_to_validate])"},{"line_number":53,"context_line":"            else:"},{"line_number":54,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_2c71f2e0","line":51,"updated":"2016-01-21 14:57:54.000000000","message":"Is this change relevant to what you are doing? So not you are saying is if a None is found in the kwargs, we\u0027ll validate it and give the user a bad error message.\n\nhttp://paste.openstack.org/show/484579/\n\nThat paste also shows that the tests are broken because of the .pop() calls.","commit_id":"3bfd71fc97dabe9234ceafc2e1d5cad1eaa44c69"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"8e2cc561fe56a1e5f69942b54982f64b550c7bae","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        @functools.wraps(func)"},{"line_number":50,"context_line":"        def wrapper(*args, **kwargs):"},{"line_number":51,"context_line":"            if resource_to_validate in kwargs:"},{"line_number":52,"context_line":"                schema_validator.validate(kwargs[resource_to_validate])"},{"line_number":53,"context_line":"            else:"},{"line_number":54,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_6db4a8d0","line":51,"in_reply_to":"9a68dd71_2c71f2e0","updated":"2016-01-22 01:47:42.000000000","message":"@dstanek: there are two cases here, body is not passed at all (None), body is passed as empty.\n\nper the previous discussion, I am going to just relax it from here to validate it through jsonschema if body is empty.\n\nso, the trade-off here is it will possibly throw some bad message for some entities where empty body is not allowed, but will also not impact the functionality where empty body is *do* allowed, such as `region` and `consumer`.\n\nyep, you hit the point since you know the history!","commit_id":"3bfd71fc97dabe9234ceafc2e1d5cad1eaa44c69"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"22821ce07f3da03850dc160e41f55c95bbd6eb3f","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        @functools.wraps(func)"},{"line_number":50,"context_line":"        def wrapper(*args, **kwargs):"},{"line_number":51,"context_line":"            if resource_to_validate in kwargs:"},{"line_number":52,"context_line":"                schema_validator.validate(kwargs[resource_to_validate])"},{"line_number":53,"context_line":"            else:"},{"line_number":54,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_eb2709c8","line":51,"in_reply_to":"9a68dd71_50892725","updated":"2016-01-22 13:03:40.000000000","message":"I don\u0027t buy that this method doesn\u0027t need to handle a corner case because it\u0027s handled by the caller. You can\u0027t trust that it will always be handled properly. Each method should protect itself.","commit_id":"3bfd71fc97dabe9234ceafc2e1d5cad1eaa44c69"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"24deebd574c71d55526676f8299dff444ff0eb97","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        @functools.wraps(func)"},{"line_number":50,"context_line":"        def wrapper(*args, **kwargs):"},{"line_number":51,"context_line":"            if resource_to_validate in kwargs:"},{"line_number":52,"context_line":"                schema_validator.validate(kwargs[resource_to_validate])"},{"line_number":53,"context_line":"            else:"},{"line_number":54,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_50892725","line":51,"in_reply_to":"9a68dd71_6db4a8d0","updated":"2016-01-22 11:15:34.000000000","message":"to answer your question from http://paste.openstack.org/show/484579/, user will never get that situation since it\u0027s not a valid json format, it will catch by other code before the schema got actually validated.\n\nsee: http://paste.openstack.org/show/484660/\n\nL58 is possible since it is only happened for internal API call instead of CURL.\n\nThe testcase to check body is not passed has been covered by this testcase:\n test_create_entity_no_request_body_with_decorator.","commit_id":"3bfd71fc97dabe9234ceafc2e1d5cad1eaa44c69"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"fe6e6a04b2f77bc41c47f1da6edfb5c5bf868e1d","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        @functools.wraps(func)"},{"line_number":50,"context_line":"        def wrapper(*args, **kwargs):"},{"line_number":51,"context_line":"            if resource_to_validate in kwargs:"},{"line_number":52,"context_line":"                schema_validator.validate(kwargs[resource_to_validate])"},{"line_number":53,"context_line":"            else:"},{"line_number":54,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_19dd0e6f","line":51,"in_reply_to":"9a68dd71_eb2709c8","updated":"2016-01-22 14:41:57.000000000","message":"i will update the testcases to include this too, done!","commit_id":"3bfd71fc97dabe9234ceafc2e1d5cad1eaa44c69"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"c044d9864c5899e163e5b8689ccc57e03969d531","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        @functools.wraps(func)"},{"line_number":50,"context_line":"        def wrapper(*args, **kwargs):"},{"line_number":51,"context_line":"            # body is passed but is empty should be allowed here but controlled"},{"line_number":52,"context_line":"            # by each schema if it\u0027s not allowed, for example, you can set"},{"line_number":53,"context_line":"            # \u0027required\u0027, or \u0027minProperties\u0027 in the schema to make sure certain"},{"line_number":54,"context_line":"            # properties or minimal properties should be presented."}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_86d7644a","line":51,"updated":"2016-01-22 13:07:30.000000000","message":"This comment is confusing.","commit_id":"9be2263dd909a391fba6e9abed459b23cecfa30f"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"74fc51196f8f6ef1ab8b150e989381933ce27c75","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        @functools.wraps(func)"},{"line_number":50,"context_line":"        def wrapper(*args, **kwargs):"},{"line_number":51,"context_line":"            # body is passed but is empty should be allowed here but controlled"},{"line_number":52,"context_line":"            # by each schema if it\u0027s not allowed, for example, you can set"},{"line_number":53,"context_line":"            # \u0027required\u0027, or \u0027minProperties\u0027 in the schema to make sure certain"},{"line_number":54,"context_line":"            # properties or minimal properties should be presented."}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_d95d3616","line":51,"in_reply_to":"9a68dd71_86d7644a","updated":"2016-01-22 14:41:01.000000000","message":"i will remove them, i think it should be clear from the code as well.","commit_id":"9be2263dd909a391fba6e9abed459b23cecfa30f"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"c044d9864c5899e163e5b8689ccc57e03969d531","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                            attribute\u003dresource_to_validate,"},{"line_number":67,"context_line":"                            target\u003d\u0027request body\u0027)"},{"line_number":68,"context_line":"                # We cannot find the resource from kwargs or args."},{"line_number":69,"context_line":"                # So, the body is not given at all, in this case we will"},{"line_number":70,"context_line":"                # thrown exception to indicate there is something wrong"},{"line_number":71,"context_line":"                # for the request body."},{"line_number":72,"context_line":"                except IndexError:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_c646bc4e","line":69,"updated":"2016-01-22 13:07:30.000000000","message":"We don\u0027t need the extra clarification because it\u0027s just saying what the code does. The original comment clarifies why.","commit_id":"9be2263dd909a391fba6e9abed459b23cecfa30f"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"74fc51196f8f6ef1ab8b150e989381933ce27c75","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                            attribute\u003dresource_to_validate,"},{"line_number":67,"context_line":"                            target\u003d\u0027request body\u0027)"},{"line_number":68,"context_line":"                # We cannot find the resource from kwargs or args."},{"line_number":69,"context_line":"                # So, the body is not given at all, in this case we will"},{"line_number":70,"context_line":"                # thrown exception to indicate there is something wrong"},{"line_number":71,"context_line":"                # for the request body."},{"line_number":72,"context_line":"                except IndexError:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_799d2abb","line":69,"in_reply_to":"9a68dd71_c646bc4e","updated":"2016-01-22 14:41:01.000000000","message":"Done","commit_id":"9be2263dd909a391fba6e9abed459b23cecfa30f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"aef8a1c36c85759b0703c8eaa7f44e5aab7463db","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    :param request_body_schema: a schema to validate the resource reference"},{"line_number":29,"context_line":"    :param resource_to_validate: the reference to validate"},{"line_number":30,"context_line":"    :raises keystone.exception.ValidationError: if `resource_to_validate` is"},{"line_number":31,"context_line":"            not given. (see wrapper method below)."},{"line_number":32,"context_line":"    :raises TypeError: at decoration time when the expected resource to"},{"line_number":33,"context_line":"                       validate isn\u0027t found in the decorated method\u0027s"},{"line_number":34,"context_line":"                       signature"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_3b602f01","line":31,"updated":"2016-01-28 21:31:55.000000000","message":"change \"not given\" to \"None\"","commit_id":"63a0a3cb2a5972451a570704f6e26404cfea1d39"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"dcd679008a68e7bfb16aa7eda0aef19e54680ae6","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                    resource \u003d args[arg_index]"},{"line_number":57,"context_line":"                    # If the resource to be validated is not None but"},{"line_number":58,"context_line":"                    # empty, it is possible to be validated by jsonschema."},{"line_number":59,"context_line":"                    if resource is not None:"},{"line_number":60,"context_line":"                        schema_validator.validate(resource)"},{"line_number":61,"context_line":"                    else:"},{"line_number":62,"context_line":"                        raise exception.ValidationError("}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_04cf4e80","line":59,"updated":"2016-01-27 21:46:12.000000000","message":"Proper logic. Allows \u0027\u0027.","commit_id":"63a0a3cb2a5972451a570704f6e26404cfea1d39"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1217a238d99a3ee90bc36a032f276c9ab77c5467","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    :param request_body_schema: a schema to validate the resource reference"},{"line_number":29,"context_line":"    :param resource_to_validate: the reference to validate"},{"line_number":30,"context_line":"    :raises keystone.exception.ValidationError: if `resource_to_validate` is"},{"line_number":31,"context_line":"            not None. (see wrapper method below)."},{"line_number":32,"context_line":"    :raises TypeError: at decoration time when the expected resource to"},{"line_number":33,"context_line":"                       validate isn\u0027t found in the decorated method\u0027s"},{"line_number":34,"context_line":"                       signature"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_ac5b832d","line":31,"range":{"start_line":31,"start_character":12,"end_line":31,"end_character":15},"updated":"2016-01-28 22:09:41.000000000","message":"remove \"not\"","commit_id":"831beab06c108b868194284d110d54216c0b05d6"}],"keystone/tests/unit/test_validation.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"9074b001800fd8d7cb7d29fed4e3a55917d5de71","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                                              uuid.uuid4().hex,"},{"line_number":180,"context_line":"                                              entity\u003d{})"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def test_create_entity_empty_resource_pass_validation(self):"},{"line_number":183,"context_line":"        self.create_entity_allow_empty(entity\u003d{})"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def test_create_entity_no_request_body_pass_validation(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_e86e422e","line":182,"updated":"2015-10-20 20:40:18.000000000","message":"add a test for:\n\n  self.create_entity_allow_empty(entity\u003d{})\n\nwhere you call the validator at L122","commit_id":"5e4193cd6bc2934af8e662a8b91ca58caba73b5a"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"bd981d49e17ccf4045fc3ca7024cd1d33358ee5d","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                                              uuid.uuid4().hex,"},{"line_number":180,"context_line":"                                              entity\u003d{})"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def test_create_entity_empty_resource_pass_validation(self):"},{"line_number":183,"context_line":"        self.create_entity_allow_empty(entity\u003d{})"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def test_create_entity_no_request_body_pass_validation(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_99dfcd0c","line":182,"in_reply_to":"3a29b11f_e86e422e","updated":"2015-10-21 09:23:42.000000000","message":"this case already covered by \nL167: test_create_entity_empty_request_body_with_decorator where default value for allow_empty is false.","commit_id":"5e4193cd6bc2934af8e662a8b91ca58caba73b5a"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"78203351ed77b1495fe27cb76a3aac94708200fe","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        pass"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    @validation.validated(entity_create, \u0027entity\u0027, allow_empty\u003dTrue)"},{"line_number":131,"context_line":"    def create_entity_allow_empty(self, entity\u003dNone):"},{"line_number":132,"context_line":"        pass"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _assert_call_entity_method_fails(self, method, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_9219117c","line":131,"updated":"2015-12-04 20:13:15.000000000","message":"I think there is a difference between empty and None, right?","commit_id":"601930d3086c1645af0981076e2f70955af55ab7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"e5a96517a0cf9db3fdb5723dc06891f21ebb27b3","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        pass"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    @validation.validated(entity_create, \u0027entity\u0027, allow_empty\u003dTrue)"},{"line_number":131,"context_line":"    def create_entity_allow_empty(self, entity\u003dNone):"},{"line_number":132,"context_line":"        pass"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _assert_call_entity_method_fails(self, method, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_544076a5","line":131,"in_reply_to":"7a740942_9219117c","updated":"2015-12-04 21:01:40.000000000","message":"Lance, maybe I am overthinking about it, let\u0027s see the special case as `creating region` which could be done with empty body and actually empty body doesn\u0027t bear any info.\n\nIf keystone allows to create a region with empty body why not allows to create the region with None body, it\u0027s basically the same, right? or anything I missed somewhere?","commit_id":"601930d3086c1645af0981076e2f70955af55ab7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b28b74185fe46ed2bf22d00002c9aed7b082c491","unresolved":false,"context_lines":[{"line_number":900,"context_line":"    def test_validate_region_create_succeeds_with_no_parameters(self):"},{"line_number":901,"context_line":"        \"\"\"Validate create region request with no parameters.\"\"\""},{"line_number":902,"context_line":"        request_to_validate \u003d {}"},{"line_number":903,"context_line":"        self.create_region_validator.validate(request_to_validate)"},{"line_number":904,"context_line":""},{"line_number":905,"context_line":"    def test_validate_region_update_succeeds(self):"},{"line_number":906,"context_line":"        \"\"\"Test that we validate a region update request.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_a5552b1e","line":903,"range":{"start_line":903,"start_character":13,"end_line":903,"end_character":36},"updated":"2016-01-20 18:40:45.000000000","message":"do we need to test this with update?","commit_id":"9e96b3072f8517e344f2a49f836aba544adf8634"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0cc78e785c55c9cc127402afcf9ebc3c95c96d98","unresolved":false,"context_lines":[{"line_number":900,"context_line":"    def test_validate_region_create_succeeds_with_no_parameters(self):"},{"line_number":901,"context_line":"        \"\"\"Validate create region request with no parameters.\"\"\""},{"line_number":902,"context_line":"        request_to_validate \u003d {}"},{"line_number":903,"context_line":"        self.create_region_validator.validate(request_to_validate)"},{"line_number":904,"context_line":""},{"line_number":905,"context_line":"    def test_validate_region_update_succeeds(self):"},{"line_number":906,"context_line":"        \"\"\"Test that we validate a region update request.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_56d09153","line":903,"range":{"start_line":903,"start_character":13,"end_line":903,"end_character":36},"in_reply_to":"9a68dd71_a5552b1e","updated":"2016-01-21 02:52:19.000000000","message":"i just thought that update with empty body is not make sense, but this should be allowed from here and let this be  controlled by schema definition instead.","commit_id":"9e96b3072f8517e344f2a49f836aba544adf8634"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"fca55929cb46654ffe5b21b7c82585ebb3017550","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def test_create_entity_empty_request_body_with_decorator(self):"},{"line_number":168,"context_line":"        \"\"\"Test the case when request body is not provided.\"\"\""},{"line_number":169,"context_line":"        entity_create.pop(\u0027required\u0027)"},{"line_number":170,"context_line":"        self.create_entity(entity\u003d{})"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_update_entity_empty_request_body_with_decorator(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_ac5e4210","line":169,"updated":"2016-01-21 14:57:54.000000000","message":"You are changing a global and not setting it back to it\u0027s original state. Maybe you want a copy?","commit_id":"3bfd71fc97dabe9234ceafc2e1d5cad1eaa44c69"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"24deebd574c71d55526676f8299dff444ff0eb97","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def test_create_entity_empty_request_body_with_decorator(self):"},{"line_number":168,"context_line":"        \"\"\"Test the case when request body is not provided.\"\"\""},{"line_number":169,"context_line":"        entity_create.pop(\u0027required\u0027)"},{"line_number":170,"context_line":"        self.create_entity(entity\u003d{})"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_update_entity_empty_request_body_with_decorator(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_3aec928e","line":169,"in_reply_to":"9a68dd71_ac5e4210","updated":"2016-01-22 11:15:34.000000000","message":"Done","commit_id":"3bfd71fc97dabe9234ceafc2e1d5cad1eaa44c69"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"8e2cc561fe56a1e5f69942b54982f64b550c7bae","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def test_create_entity_empty_request_body_with_decorator(self):"},{"line_number":168,"context_line":"        \"\"\"Test the case when request body is not provided.\"\"\""},{"line_number":169,"context_line":"        entity_create.pop(\u0027required\u0027)"},{"line_number":170,"context_line":"        self.create_entity(entity\u003d{})"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_update_entity_empty_request_body_with_decorator(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_ed473849","line":169,"in_reply_to":"9a68dd71_ac5e4210","updated":"2016-01-22 01:47:42.000000000","message":"yes! you catch it!","commit_id":"3bfd71fc97dabe9234ceafc2e1d5cad1eaa44c69"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"fca55929cb46654ffe5b21b7c82585ebb3017550","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_update_entity_empty_request_body_with_decorator(self):"},{"line_number":173,"context_line":"        \"\"\"Test the case when request body is not provided.\"\"\""},{"line_number":174,"context_line":"        entity_update.pop(\u0027minProperties\u0027)"},{"line_number":175,"context_line":"        self.update_entity(uuid.uuid4().hex, entity\u003d{})"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_ecabdad4","line":174,"updated":"2016-01-21 14:57:54.000000000","message":"Same here","commit_id":"3bfd71fc97dabe9234ceafc2e1d5cad1eaa44c69"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"24deebd574c71d55526676f8299dff444ff0eb97","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_update_entity_empty_request_body_with_decorator(self):"},{"line_number":173,"context_line":"        \"\"\"Test the case when request body is not provided.\"\"\""},{"line_number":174,"context_line":"        entity_update.pop(\u0027minProperties\u0027)"},{"line_number":175,"context_line":"        self.update_entity(uuid.uuid4().hex, entity\u003d{})"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_fafefa36","line":174,"in_reply_to":"9a68dd71_ecabdad4","updated":"2016-01-22 11:15:34.000000000","message":"Done","commit_id":"3bfd71fc97dabe9234ceafc2e1d5cad1eaa44c69"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"8e2cc561fe56a1e5f69942b54982f64b550c7bae","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_update_entity_empty_request_body_with_decorator(self):"},{"line_number":173,"context_line":"        \"\"\"Test the case when request body is not provided.\"\"\""},{"line_number":174,"context_line":"        entity_update.pop(\u0027minProperties\u0027)"},{"line_number":175,"context_line":"        self.update_entity(uuid.uuid4().hex, entity\u003d{})"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_6d7268af","line":174,"in_reply_to":"9a68dd71_ecabdad4","updated":"2016-01-22 01:47:42.000000000","message":"sure, will do the update!","commit_id":"3bfd71fc97dabe9234ceafc2e1d5cad1eaa44c69"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"64f96eb0ab7784c903de2446c4d6d6205050614c","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    def test_create_entity_empty_request_body_with_decorator(self):"},{"line_number":165,"context_line":"        \"\"\"Test the case when client passing in an empty entity reference.\"\"\""},{"line_number":166,"context_line":"        global entity_create"},{"line_number":167,"context_line":"        schema_create \u003d entity_create.copy()"},{"line_number":168,"context_line":"        # pop \u0027required\u0027 from schema so that empty body is allowed."},{"line_number":169,"context_line":"        entity_create.pop(\u0027required\u0027)"},{"line_number":170,"context_line":"        self.create_entity(entity\u003d{})"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_5d24c95e","line":167,"range":{"start_line":167,"start_character":8,"end_line":167,"end_character":21},"updated":"2016-01-22 17:11:48.000000000","message":"nit: this name could be a little more descriptive in that it\u0027s actually a copy.","commit_id":"6c15c0a20fb00cae2922da4e5989cee09f02ffe6"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"bb0bbaad86823166e7f9025e6ac8e7f4f6989f18","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    def test_create_entity_empty_request_body_with_decorator(self):"},{"line_number":165,"context_line":"        \"\"\"Test the case when client passing in an empty entity reference.\"\"\""},{"line_number":166,"context_line":"        global entity_create"},{"line_number":167,"context_line":"        schema_create \u003d entity_create.copy()"},{"line_number":168,"context_line":"        # pop \u0027required\u0027 from schema so that empty body is allowed."},{"line_number":169,"context_line":"        entity_create.pop(\u0027required\u0027)"},{"line_number":170,"context_line":"        self.create_entity(entity\u003d{})"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_dcb748d6","line":167,"range":{"start_line":167,"start_character":8,"end_line":167,"end_character":21},"in_reply_to":"9a68dd71_5d24c95e","updated":"2016-01-23 03:32:35.000000000","message":"Done","commit_id":"6c15c0a20fb00cae2922da4e5989cee09f02ffe6"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"64f96eb0ab7784c903de2446c4d6d6205050614c","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    def test_update_entity_empty_request_body_with_decorator(self):"},{"line_number":182,"context_line":"        \"\"\"Test the case when client passing in an empty entity reference.\"\"\""},{"line_number":183,"context_line":"        global entity_update"},{"line_number":184,"context_line":"        schema_update \u003d entity_update.copy()"},{"line_number":185,"context_line":"        # pop \u0027minProperties\u0027 from schema so that empty body is allowed."},{"line_number":186,"context_line":"        entity_update.pop(\u0027minProperties\u0027)"},{"line_number":187,"context_line":"        self.update_entity(uuid.uuid4().hex, entity\u003d{})"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_7d298d36","line":184,"range":{"start_line":184,"start_character":8,"end_line":184,"end_character":21},"updated":"2016-01-22 17:11:48.000000000","message":"same comment here","commit_id":"6c15c0a20fb00cae2922da4e5989cee09f02ffe6"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"bb0bbaad86823166e7f9025e6ac8e7f4f6989f18","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    def test_update_entity_empty_request_body_with_decorator(self):"},{"line_number":182,"context_line":"        \"\"\"Test the case when client passing in an empty entity reference.\"\"\""},{"line_number":183,"context_line":"        global entity_update"},{"line_number":184,"context_line":"        schema_update \u003d entity_update.copy()"},{"line_number":185,"context_line":"        # pop \u0027minProperties\u0027 from schema so that empty body is allowed."},{"line_number":186,"context_line":"        entity_update.pop(\u0027minProperties\u0027)"},{"line_number":187,"context_line":"        self.update_entity(uuid.uuid4().hex, entity\u003d{})"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_fcbc8cbc","line":184,"range":{"start_line":184,"start_character":8,"end_line":184,"end_character":21},"in_reply_to":"9a68dd71_7d298d36","updated":"2016-01-23 03:32:35.000000000","message":"Done","commit_id":"6c15c0a20fb00cae2922da4e5989cee09f02ffe6"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"aef8a1c36c85759b0703c8eaa7f44e5aab7463db","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        # pop \u0027required\u0027 from schema so that empty body is allowed."},{"line_number":140,"context_line":"        entity_create.pop(\u0027required\u0027)"},{"line_number":141,"context_line":"        self.create_entity(entity\u003d{})"},{"line_number":142,"context_line":"        entity_create \u003d original_entity_create"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @expected_validation_failure"},{"line_number":145,"context_line":"    def test_calling_create_with_kwarg_as_None_fails(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_661daa0e","line":142,"updated":"2016-01-28 21:31:55.000000000","message":"rather than copy the global and then use the global, use the copy instead.","commit_id":"63a0a3cb2a5972451a570704f6e26404cfea1d39"}]}
