{"action":"created","issue":{"url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/2312","repository_url":"https://api.github.com/repos/OpenAPITools/openapi-generator","labels_url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/2312/labels{/name}","comments_url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/2312/comments","events_url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/2312/events","html_url":"https://github.com/OpenAPITools/openapi-generator/issues/2312","id":418171406,"node_id":"MDU6SXNzdWU0MTgxNzE0MDY=","number":2312,"title":"[BUG] haskell-http-client: Arbitrary instance for recursive data structures runs forever","user":{"login":"guoshimin","id":11787293,"node_id":"MDQ6VXNlcjExNzg3Mjkz","avatar_url":"https://avatars2.githubusercontent.com/u/11787293?v=4","gravatar_id":"","url":"https://api.github.com/users/guoshimin","html_url":"https://github.com/guoshimin","followers_url":"https://api.github.com/users/guoshimin/followers","following_url":"https://api.github.com/users/guoshimin/following{/other_user}","gists_url":"https://api.github.com/users/guoshimin/gists{/gist_id}","starred_url":"https://api.github.com/users/guoshimin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guoshimin/subscriptions","organizations_url":"https://api.github.com/users/guoshimin/orgs","repos_url":"https://api.github.com/users/guoshimin/repos","events_url":"https://api.github.com/users/guoshimin/events{/privacy}","received_events_url":"https://api.github.com/users/guoshimin/received_events","type":"User","site_admin":false},"labels":[{"id":931403399,"node_id":"MDU6TGFiZWw5MzE0MDMzOTk=","url":"https://api.github.com/repos/OpenAPITools/openapi-generator/labels/Issue:%20Bug","name":"Issue: Bug","color":"e11d21","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-03-07T07:46:57Z","updated_at":"2019-03-07T16:12:27Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"#### Bug Report Checklist\r\n\r\n- [x] Have you provided a full/minimal spec to reproduce the issue?\r\n- [ ] Have you validated the input using an OpenAPI validator ([example](https://apidevtools.org/swagger-parser/online/))?\r\n- [x] What's the version of OpenAPI Generator used?\r\n- [x] Have you search for related issues/PRs?\r\n- [ ] What's the actual output vs expected output?\r\n- [ ] [Optional] Bounty to sponsor the fix ([example](https://www.bountysource.com/issues/66123212-javascript-client-produces-a-wrong-object-for-a-string-enum-type-that-is-used-with-ref))\r\n\r\n<!--\r\nPlease follow the issue template below for bug reports.\r\nAlso please indicate in the issue title which language/library is concerned. Eg:  [BUG][JAVA] Bug generating foo with bar \r\n-->\r\n\r\n##### Description\r\n\r\n@jonschoning  haskell-http-client generates QuickCheck-based JSON roundtrip tests. For recursive data structures, the Arbitrary instance runs forever.\r\n\r\n##### openapi-generator version\r\n\r\nmaster\r\n\r\n##### OpenAPI declaration file content or url\r\n\r\nhttps://raw.githubusercontent.com/kubernetes/kubernetes/release-1.9/api/openapi-spec/swagger.json\r\n<!-- if it is a bug, a json or yaml that produces it.\r\nIf you post the code inline, please wrap it with\r\n```yaml\r\n(here your code)\r\n```\r\n(for YAML code) or\r\n```json\r\n(here your code)\r\n```\r\n(for JSON code), so it becomes more readable. If it is longer than about ten lines,\r\nplease create a Gist (https://gist.github.com) or upload it somewhere else and\r\nlink it here.\r\n  -->\r\n\r\n##### Command line used for generation\r\n\r\n<!-- including the language, libraries and various options -->\r\n\r\n##### Steps to reproduce\r\n\r\nRun `stack test` on the generated code. The test will be stuck at `V1beta1CustomResourceDefinition`. The cause is `V1beta1JSONSchemaProps` which is a recursive structure.\r\n\r\n##### Related issues/PRs\r\n\r\n<!-- has a similar issue/PR been reported/opened before? Please do a search in https://github.com/openapitools/openapi-generator/issues?utf8=%E2%9C%93&q=is%3Aissue%20 -->\r\n\r\n##### Suggest a fix\r\n\r\n<!-- if you can't fix the bug yourself, perhaps you can point to what might be\r\n  causing the problem (line of code or commit), or simply make a suggestion -->\r\n"},"comment":{"url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/comments/470588620","html_url":"https://github.com/OpenAPITools/openapi-generator/issues/2312#issuecomment-470588620","issue_url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/2312","id":470588620,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3MDU4ODYyMA==","user":{"login":"jonschoning","id":137183,"node_id":"MDQ6VXNlcjEzNzE4Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/137183?v=4","gravatar_id":"","url":"https://api.github.com/users/jonschoning","html_url":"https://github.com/jonschoning","followers_url":"https://api.github.com/users/jonschoning/followers","following_url":"https://api.github.com/users/jonschoning/following{/other_user}","gists_url":"https://api.github.com/users/jonschoning/gists{/gist_id}","starred_url":"https://api.github.com/users/jonschoning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonschoning/subscriptions","organizations_url":"https://api.github.com/users/jonschoning/orgs","repos_url":"https://api.github.com/users/jonschoning/repos","events_url":"https://api.github.com/users/jonschoning/events{/privacy}","received_events_url":"https://api.github.com/users/jonschoning/received_events","type":"User","site_admin":false},"created_at":"2019-03-07T16:12:27Z","updated_at":"2019-03-07T16:12:27Z","author_association":"CONTRIBUTOR","body":"recursive datatypes typically require writing a custom Arbitrary instances to control the size of the tree.\r\nsome initial thoughts: \r\n 1. provide a list of datatypes to the generator for which it should not automatically create arbitrary instances for.  These datatypes can then be prepared in a different non-generated file with the custom logic.\r\n 2. provide a list of datatypes to the generator for which MimeJson tests should be excluded entirely\r\n 3. find a way to automatically generate shrinking trees for recursive types; given the limits of codegen, i'm not sure off the top of my head how to achieve it, but am open to ideas."}}
{"actor":{"display_login":"jonschoning"}}