{"action":"created","issue":{"url":"https://api.github.com/repos/RSuter/NSwag/issues/1523","repository_url":"https://api.github.com/repos/RSuter/NSwag","labels_url":"https://api.github.com/repos/RSuter/NSwag/issues/1523/labels{/name}","comments_url":"https://api.github.com/repos/RSuter/NSwag/issues/1523/comments","events_url":"https://api.github.com/repos/RSuter/NSwag/issues/1523/events","html_url":"https://github.com/RSuter/NSwag/issues/1523","id":348950310,"node_id":"MDU6SXNzdWUzNDg5NTAzMTA=","number":1523,"title":"Default null handling not working as expected for .NET assembly","user":{"login":"jonocairns","id":182836,"node_id":"MDQ6VXNlcjE4MjgzNg==","avatar_url":"https://avatars1.githubusercontent.com/u/182836?v=4","gravatar_id":"","url":"https://api.github.com/users/jonocairns","html_url":"https://github.com/jonocairns","followers_url":"https://api.github.com/users/jonocairns/followers","following_url":"https://api.github.com/users/jonocairns/following{/other_user}","gists_url":"https://api.github.com/users/jonocairns/gists{/gist_id}","starred_url":"https://api.github.com/users/jonocairns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonocairns/subscriptions","organizations_url":"https://api.github.com/users/jonocairns/orgs","repos_url":"https://api.github.com/users/jonocairns/repos","events_url":"https://api.github.com/users/jonocairns/events{/privacy}","received_events_url":"https://api.github.com/users/jonocairns/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-09T01:53:03Z","updated_at":"2018-08-09T21:25:57Z","closed_at":null,"author_association":"NONE","body":"Hi there!\r\n\r\nBelow is a screenshot of the setup in nswag studio.\r\n\r\n![image](https://user-images.githubusercontent.com/182836/43873282-2c9f6fd2-9bda-11e8-9dd1-a61446652167.png)\r\n\r\n(essentially setting `\"defaultReferenceTypeNullHandling\": \"NotNull\"` in the nswag file)\r\n\r\n```\r\n    public class BrandProps\r\n    {\r\n        public Brand Brand { get; set; }\r\n        public string FieldName { get; set; }\r\n        public bool IsEditable { get; set; }\r\n        public string ErrorMessage { get; set; }\r\n    }\r\n```\r\n\r\n\r\nIs exporting to this\r\n\r\n```\r\nexport interface BrandProps {\r\n    brand?: Brand | undefined;\r\n    fieldName?: string | undefined;\r\n    isEditable?: boolean | undefined;\r\n    errorMessage?: string | undefined;\r\n}\r\n```\r\n\r\nI would expect it to be something like this\r\n\r\n```\r\nexport interface BrandProps {\r\n    brand: Brand;\r\n    fieldName: string;\r\n    isEditable: boolean;\r\n    errorMessage: string;\r\n}\r\n```\r\n\r\nIs there something I'm not doing right? Thanks in advance!"},"comment":{"url":"https://api.github.com/repos/RSuter/NSwag/issues/comments/411902686","html_url":"https://github.com/RSuter/NSwag/issues/1523#issuecomment-411902686","issue_url":"https://api.github.com/repos/RSuter/NSwag/issues/1523","id":411902686,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTkwMjY4Ng==","user":{"login":"jonocairns","id":182836,"node_id":"MDQ6VXNlcjE4MjgzNg==","avatar_url":"https://avatars1.githubusercontent.com/u/182836?v=4","gravatar_id":"","url":"https://api.github.com/users/jonocairns","html_url":"https://github.com/jonocairns","followers_url":"https://api.github.com/users/jonocairns/followers","following_url":"https://api.github.com/users/jonocairns/following{/other_user}","gists_url":"https://api.github.com/users/jonocairns/gists{/gist_id}","starred_url":"https://api.github.com/users/jonocairns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonocairns/subscriptions","organizations_url":"https://api.github.com/users/jonocairns/orgs","repos_url":"https://api.github.com/users/jonocairns/repos","events_url":"https://api.github.com/users/jonocairns/events{/privacy}","received_events_url":"https://api.github.com/users/jonocairns/received_events","type":"User","site_admin":false},"created_at":"2018-08-09T21:25:57Z","updated_at":"2018-08-09T21:25:57Z","author_association":"NONE","body":"```\r\n{\r\n  \"swagger\": \"2.0\",\r\n  \"info\": {\r\n    \"title\": \"\",\r\n    \"version\": \"\"\r\n  },\r\n  \"definitions\": {\r\n    \"BrandProps\": {\r\n      \"type\": \"object\",\r\n      \"additionalProperties\": false,\r\n      \"properties\": {\r\n        \"brand\": {\r\n          \"$ref\": \"#/definitions/Brand\"\r\n        },\r\n        \"fieldName\": {\r\n          \"type\": [\r\n            \"null\",\r\n            \"string\"\r\n          ]\r\n        },\r\n        \"isEditable\": {\r\n          \"type\": \"boolean\"\r\n        },\r\n        \"errorMessage\": {\r\n          \"type\": [\r\n            \"null\",\r\n            \"string\"\r\n          ]\r\n        }\r\n      }\r\n    },\r\n    \"Brand\": {\r\n      \"type\": \"integer\",\r\n      \"description\": \"\",\r\n      \"x-enumFlags\": true,\r\n      \"x-enumNames\": [\r\n        \"MyFoodBag\",\r\n        \"BargainBox\",\r\n        \"FreshStart\"\r\n      ],\r\n      \"enum\": [\r\n        1,\r\n        2,\r\n        4\r\n      ]\r\n    }\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"jonocairns"}}