{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3162","repository_url":"https://api.github.com/repos/swagger-api/swagger-codegen","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3162/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3162/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3162/events","html_url":"https://github.com/swagger-api/swagger-codegen/issues/3162","id":160973822,"number":3162,"title":"[JAVA, JS] A class with no members for model of type string","user":{"login":"danadam","id":170743,"avatar_url":"https://avatars.githubusercontent.com/u/170743?v=3","gravatar_id":"","url":"https://api.github.com/users/danadam","html_url":"https://github.com/danadam","followers_url":"https://api.github.com/users/danadam/followers","following_url":"https://api.github.com/users/danadam/following{/other_user}","gists_url":"https://api.github.com/users/danadam/gists{/gist_id}","starred_url":"https://api.github.com/users/danadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danadam/subscriptions","organizations_url":"https://api.github.com/users/danadam/orgs","repos_url":"https://api.github.com/users/danadam/repos","events_url":"https://api.github.com/users/danadam/events{/privacy}","received_events_url":"https://api.github.com/users/danadam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-17T20:59:19Z","updated_at":"2016-06-24T02:56:20Z","closed_at":null,"body":"##### Description\r\n\r\nI have a model of type string (with maxLength but it doesn't affect anything). Java class generated for it has no members at all:\r\n```java\r\npublic class Foo   {\r\n  \r\n\r\n  \r\n  @Override\r\n  public boolean equals(java.lang.Object o) {\r\n```\r\n\r\n##### Swagger-codegen version\r\n\r\n``cc5e79cd0d19 (2016-06-17 19:36:24 +0800) wing328 - move server stub doc to wiki``\r\n\r\n##### Swagger declaration file content or url\r\n\r\n```yaml\r\nswagger: \"2.0\"\r\ninfo:\r\n    version: \"0.1.0\"\r\n    title: bla\r\nhost: example.com\r\npaths:\r\n    /example:\r\n        get:\r\n            operationId: bla\r\n            parameters:\r\n            -   name: MyParam\r\n                in: body\r\n                schema:\r\n                    type: object\r\n                    properties:\r\n                        bar:\r\n                            $ref: '#/definitions/foo'\r\n            responses:\r\n                default:\r\n                    description: bla\r\n\r\ndefinitions:\r\n    foo:\r\n        type: string\r\n        maxLength: 32\r\n```\r\n\r\n##### Command line used for generation\r\n\r\n``java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i bug.yaml -l java -o bla``"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/comments/228245805","html_url":"https://github.com/swagger-api/swagger-codegen/issues/3162#issuecomment-228245805","issue_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3162","id":228245805,"user":{"login":"wing328","id":934260,"avatar_url":"https://avatars.githubusercontent.com/u/934260?v=3","gravatar_id":"","url":"https://api.github.com/users/wing328","html_url":"https://github.com/wing328","followers_url":"https://api.github.com/users/wing328/followers","following_url":"https://api.github.com/users/wing328/following{/other_user}","gists_url":"https://api.github.com/users/wing328/gists{/gist_id}","starred_url":"https://api.github.com/users/wing328/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wing328/subscriptions","organizations_url":"https://api.github.com/users/wing328/orgs","repos_url":"https://api.github.com/users/wing328/repos","events_url":"https://api.github.com/users/wing328/events{/privacy}","received_events_url":"https://api.github.com/users/wing328/received_events","type":"User","site_admin":false},"created_at":"2016-06-24T02:56:20Z","updated_at":"2016-06-24T02:56:20Z","body":"Well you can simply define a model with 2 properties: `countryOfResidence` and `nationality` for the following JSON payload:\r\n```\r\n{\r\n  \"nationality\": \"us\",\r\n  \"countryOfResidence\": \"gb\"\r\n}\r\n```\r\ne.g. https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/test/resources/2_0/petstore.yaml#L612"}}
{"actor":{"display_login":"wing328"}}