{"action":"opened","issue":{"url":"https://api.github.com/repos/factset/quart-openapi/issues/19","repository_url":"https://api.github.com/repos/factset/quart-openapi","labels_url":"https://api.github.com/repos/factset/quart-openapi/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/factset/quart-openapi/issues/19/comments","events_url":"https://api.github.com/repos/factset/quart-openapi/issues/19/events","html_url":"https://github.com/factset/quart-openapi/issues/19","id":391504935,"node_id":"MDU6SXNzdWUzOTE1MDQ5MzU=","number":19,"title":"Integer validation error","user":{"login":"ehsanonline","id":4243503,"node_id":"MDQ6VXNlcjQyNDM1MDM=","avatar_url":"https://avatars0.githubusercontent.com/u/4243503?v=4","gravatar_id":"","url":"https://api.github.com/users/ehsanonline","html_url":"https://github.com/ehsanonline","followers_url":"https://api.github.com/users/ehsanonline/followers","following_url":"https://api.github.com/users/ehsanonline/following{/other_user}","gists_url":"https://api.github.com/users/ehsanonline/gists{/gist_id}","starred_url":"https://api.github.com/users/ehsanonline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehsanonline/subscriptions","organizations_url":"https://api.github.com/users/ehsanonline/orgs","repos_url":"https://api.github.com/users/ehsanonline/repos","events_url":"https://api.github.com/users/ehsanonline/events{/privacy}","received_events_url":"https://api.github.com/users/ehsanonline/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-16T21:05:18Z","updated_at":"2018-12-16T21:05:18Z","closed_at":null,"author_association":"NONE","body":"I was testing this example code:\r\n```\r\nfrom quart import request,jsonify\r\nfrom quart_openapi import Pint,Resource\r\n\r\napp = Pint(__name__)\r\n\r\nexpected = app.create_validator('sample_request', {\r\n  'type': 'object',\r\n  'properties': {\r\n    'foobar': {\r\n      'type': 'string'\r\n    },\r\n    'baz': {\r\n      'oneOf': [\r\n        { 'type': 'integer' },\r\n        { 'type': 'number', 'format': 'float' }\r\n      ]\r\n    }\r\n  }\r\n})\r\n@app.route('/')\r\nclass Testing(Resource):\r\n  @app.expect(expected)\r\n  async def post(self):\r\n    return jsonify({'message': 'OK'})\r\nif __name__ == '__main__' :\r\n  app.run(debug=True)\r\n```\r\nThen send this request:\r\n````\r\ncurl -X POST -d '{\"foobar\":\"ss\",\"baz\":123}' -H \"Content-Type: application/json\" http://127.0.0.1:5000 \r\n````\r\nI got this respond:\r\n````\r\nHTTP/1.1 400 \r\ncontent-type: application/json\r\ncontent-length: 235\r\ndate: Sun, 16 Dec 2018 21:00:01 GMT\r\nserver: hypercorn-h11\r\n\r\n{\r\n  \"message\": \"Request Body failed validation\",\r\n  \"error\": {\r\n    \"msg\": \"123 is valid under each of {'type': 'number', 'format': 'float'}, {'type': 'integer'}\",\r\n    \"value\": 123,\r\n    \"schema\": {\r\n      \"oneOf\": [{\r\n        \"type\": \"integer\"\r\n      }, {\r\n        \"type\": \"number\",\r\n        \"format\": \"float\"\r\n      }]\r\n    }\r\n  }\r\n}\r\n````\r\nBut I was expecting `{'message':'OK'}` respond.\r\nIt works with float value for `baz` key.\r\n\r\n"}}
{"actor":{"display_login":"ehsanonline"}}