{"action":"closed","issue":{"url":"https://api.github.com/repos/apiaryio/dredd/issues/1000","repository_url":"https://api.github.com/repos/apiaryio/dredd","labels_url":"https://api.github.com/repos/apiaryio/dredd/issues/1000/labels{/name}","comments_url":"https://api.github.com/repos/apiaryio/dredd/issues/1000/comments","events_url":"https://api.github.com/repos/apiaryio/dredd/issues/1000/events","html_url":"https://github.com/apiaryio/dredd/issues/1000","id":314714963,"number":1000,"title":"Dredd failing - Cannot assign to read only property 'parent' of object '#<AuthScheme>'","user":{"login":"StrikoMirko","id":3042996,"avatar_url":"https://avatars0.githubusercontent.com/u/3042996?v=4","gravatar_id":"","url":"https://api.github.com/users/StrikoMirko","html_url":"https://github.com/StrikoMirko","followers_url":"https://api.github.com/users/StrikoMirko/followers","following_url":"https://api.github.com/users/StrikoMirko/following{/other_user}","gists_url":"https://api.github.com/users/StrikoMirko/gists{/gist_id}","starred_url":"https://api.github.com/users/StrikoMirko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StrikoMirko/subscriptions","organizations_url":"https://api.github.com/users/StrikoMirko/orgs","repos_url":"https://api.github.com/users/StrikoMirko/repos","events_url":"https://api.github.com/users/StrikoMirko/events{/privacy}","received_events_url":"https://api.github.com/users/StrikoMirko/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"kylef","id":44164,"avatar_url":"https://avatars1.githubusercontent.com/u/44164?v=4","gravatar_id":"","url":"https://api.github.com/users/kylef","html_url":"https://github.com/kylef","followers_url":"https://api.github.com/users/kylef/followers","following_url":"https://api.github.com/users/kylef/following{/other_user}","gists_url":"https://api.github.com/users/kylef/gists{/gist_id}","starred_url":"https://api.github.com/users/kylef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylef/subscriptions","organizations_url":"https://api.github.com/users/kylef/orgs","repos_url":"https://api.github.com/users/kylef/repos","events_url":"https://api.github.com/users/kylef/events{/privacy}","received_events_url":"https://api.github.com/users/kylef/received_events","type":"User","site_admin":false},"assignees":[{"login":"kylef","id":44164,"avatar_url":"https://avatars1.githubusercontent.com/u/44164?v=4","gravatar_id":"","url":"https://api.github.com/users/kylef","html_url":"https://github.com/kylef","followers_url":"https://api.github.com/users/kylef/followers","following_url":"https://api.github.com/users/kylef/following{/other_user}","gists_url":"https://api.github.com/users/kylef/gists{/gist_id}","starred_url":"https://api.github.com/users/kylef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylef/subscriptions","organizations_url":"https://api.github.com/users/kylef/orgs","repos_url":"https://api.github.com/users/kylef/repos","events_url":"https://api.github.com/users/kylef/events{/privacy}","received_events_url":"https://api.github.com/users/kylef/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-04-16T15:49:09Z","updated_at":"2018-04-25T13:39:18Z","closed_at":"2018-04-25T13:39:18Z","author_association":"NONE","body":"#### Problem\r\n\r\nWhen running dredd against my swagger.json I am getting a `error: Cannot assign to read only property 'parent' of object '#<AuthScheme>'`\r\n\r\n#### My `dredd.yml`?\r\n\r\n```yaml\r\ndry-run: null\r\nhookfiles: ./dredd-hooks/*.js\r\nlanguage: nodejs\r\nsandbox: false\r\nserver: null\r\nserver-wait: 3\r\ninit: false\r\ncustom: {}\r\nnames: false\r\nonly: []\r\nreporter: []\r\noutput: []\r\nheader: []\r\nsorted: false\r\nuser: null\r\ninline-errors: false\r\ndetails: false\r\nmethod: []\r\ncolor: true\r\nlevel: info\r\ntimestamp: false\r\nsilent: false\r\npath: []\r\nhooks-worker-timeout: 5000\r\nhooks-worker-connect-timeout: 1500\r\nhooks-worker-connect-retry: 500\r\nhooks-worker-after-connect-wait: 100\r\nhooks-worker-term-timeout: 5000\r\nhooks-worker-term-retry: 500\r\nhooks-worker-handler-host: 127.0.0.1\r\nhooks-worker-handler-port: 61321\r\nconfig: ./dredd.yml\r\nblueprint: swagger.json\r\nendpoint: 'https://b3zs0lczp0.execute-api.eu-west-2.amazonaws.com/prod'\r\n\r\n```\r\n\r\n#### My `dredd --version` output?\r\n\r\n```\r\ndredd v5.1.5 (Darwin 14.5.0; x64)\r\n```\r\n\r\nUsing `dredd --level=debug` does not tell me anything, I get the same error.\r\n\r\n#### How to fix it\r\n\r\nThe problematic part is the `security` block and the `consumes` block.\r\nBasically the stuff that is making dredd fail is this\r\n\r\n```\r\n/query:\r\n    post:\r\n      summary: Manage CRUK Content CMS queries.\r\n      description: Execute elastic queries and clear cache.\r\n      operationId: query\r\n      consumes: <---------------------- either I remove one of the two options below (works with only one option)\r\n        - application/json\r\n        - text/plain \r\n      tags:\r\n        - Content\r\n      security: <---------------------- or I remove this block completely\r\n        - APIKeyHeader: []\r\n      parameters:\r\n        - in: header\r\n          name: CRUK-API-Key\r\n          description: API authentication token.\r\n          type: string\r\n          required: true\r\n          x-example: APIxxxxxToken\r\n        - in: header\r\n          name: Method\r\n          description: Query type.\r\n          type: string\r\n          required: true\r\n          enum:\r\n            - GET\r\n            - DELETE\r\n            - POST\r\n            - PUT\r\n            - OPTIONS\r\n            - PATCH\r\n            - HEAD\r\n        - in: header\r\n          name: QueryPath\r\n          description: Elastic query path eg. /content/_search.\r\n          type: string\r\n          required: true\r\n          x-example: content/_search\r\n        - in: body\r\n          name: elasticQuery\r\n          description: Elastic query.\r\n          schema:\r\n            type: object\r\n      responses:\r\n        '200':\r\n          description: Success.\r\n          schema:\r\n            type: object\r\n            items:\r\n              $ref: '#/definitions/elasticResponse'\r\n        '401':\r\n          description: Unauthorized\r\n          schema:\r\n            $ref: '#/definitions/error'\r\n```\r\n\r\nI just cant understand why is it behaving like this. If you need the complete swagger file Ill be happy to put it here.\r\n\r\nPlease help me as we are using dredd to test our API. Thank you.\r\n\r\n"}}
{"actor":{"display_login":"pksunkara"}}