{"action":"closed","issue":{"url":"https://api.github.com/repos/byjg/php-swagger-test/issues/21","repository_url":"https://api.github.com/repos/byjg/php-swagger-test","labels_url":"https://api.github.com/repos/byjg/php-swagger-test/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/byjg/php-swagger-test/issues/21/comments","events_url":"https://api.github.com/repos/byjg/php-swagger-test/issues/21/events","html_url":"https://github.com/byjg/php-swagger-test/issues/21","id":331994808,"node_id":"MDU6SXNzdWUzMzE5OTQ4MDg=","number":21,"title":"issue while consuming json","user":{"login":"patrick-bury","id":1687399,"node_id":"MDQ6VXNlcjE2ODczOTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1687399?v=4","gravatar_id":"","url":"https://api.github.com/users/patrick-bury","html_url":"https://github.com/patrick-bury","followers_url":"https://api.github.com/users/patrick-bury/followers","following_url":"https://api.github.com/users/patrick-bury/following{/other_user}","gists_url":"https://api.github.com/users/patrick-bury/gists{/gist_id}","starred_url":"https://api.github.com/users/patrick-bury/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrick-bury/subscriptions","organizations_url":"https://api.github.com/users/patrick-bury/orgs","repos_url":"https://api.github.com/users/patrick-bury/repos","events_url":"https://api.github.com/users/patrick-bury/events{/privacy}","received_events_url":"https://api.github.com/users/patrick-bury/received_events","type":"User","site_admin":false},"labels":[{"id":610694988,"node_id":"MDU6TGFiZWw2MTA2OTQ5ODg=","url":"https://api.github.com/repos/byjg/php-swagger-test/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-13T13:28:14Z","updated_at":"2018-06-30T16:08:41Z","closed_at":"2018-06-30T16:08:41Z","author_association":"NONE","body":"Hello,\r\nWhile trying to validate this I got an error in swaggerRequestBody line 27 (version 1.2.5 of your package)  : \r\n```\r\n...\r\n'accounts/create':\r\n    post:\r\n      tags:\r\n        - accounts\r\n      summary: create an account\r\n      description: create an account\r\n      operationId: createAccount\r\n      consumes:\r\n        - application/json\r\n      produces:\r\n        - application/json\r\n      parameters:\r\n        - in: body\r\n          name: name of the account\r\n          schema:\r\n            type: object\r\n            required:\r\n              - wallet_uuid\r\n              - user_uuid\r\n            properties:\r\n              wallet_uuid:\r\n                description: wallet id\r\n                type: string\r\n                format: uuid\r\n                default: '502a1aa3-5239-4d4b-af09-4dc24ac5f034'\r\n              user_uuid:\r\n                description: user id\r\n                type: string\r\n                format: uuid\r\n                default: 'e7f6c18b-8094-4c2c-9987-1be5b7c46678'\r\n      responses:\r\n        '200':\r\n          description: successful operation\r\n          schema:\r\n            $ref: '#/definitions/response_account'\r\n        '204':\r\n          description: Account not found\r\n          schema:\r\n            $ref: '#/definitions/response_error'\r\n        '400':\r\n          description: Invalid ID supplied\r\n          schema:\r\n            $ref: '#/definitions/response_error'\r\n```\r\n\r\n\r\nIt seems that in swaggerRequestBody you need to change ligne 27 from\r\n```\r\n                if ( $parameter['required'] === true && empty($body)) {\r\n```\r\nto \r\n```\r\nif (isset($parameter['required']) && $parameter['required'] === true && empty($body)) {\r\n```\r\n\r\nPerhaps my json is wrong, you'll be a better judge on that than me.\r\n\r\nRegards"}}
{"actor":{"display_login":"byjg"}}