{"action":"created","issue":{"url":"https://api.github.com/repos/fsprojects/SwaggerProvider/issues/60","repository_url":"https://api.github.com/repos/fsprojects/SwaggerProvider","labels_url":"https://api.github.com/repos/fsprojects/SwaggerProvider/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/fsprojects/SwaggerProvider/issues/60/comments","events_url":"https://api.github.com/repos/fsprojects/SwaggerProvider/issues/60/events","html_url":"https://github.com/fsprojects/SwaggerProvider/pull/60","id":193376478,"number":60,"title":"add file upload and download endpoints to the test controller","user":{"login":"baronfel","id":573979,"avatar_url":"https://avatars0.githubusercontent.com/u/573979?v=3","gravatar_id":"","url":"https://api.github.com/users/baronfel","html_url":"https://github.com/baronfel","followers_url":"https://api.github.com/users/baronfel/followers","following_url":"https://api.github.com/users/baronfel/following{/other_user}","gists_url":"https://api.github.com/users/baronfel/gists{/gist_id}","starred_url":"https://api.github.com/users/baronfel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baronfel/subscriptions","organizations_url":"https://api.github.com/users/baronfel/orgs","repos_url":"https://api.github.com/users/baronfel/repos","events_url":"https://api.github.com/users/baronfel/events{/privacy}","received_events_url":"https://api.github.com/users/baronfel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-04T21:18:12Z","updated_at":"2017-04-09T13:47:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fsprojects/SwaggerProvider/pulls/60","html_url":"https://github.com/fsprojects/SwaggerProvider/pull/60","diff_url":"https://github.com/fsprojects/SwaggerProvider/pull/60.diff","patch_url":"https://github.com/fsprojects/SwaggerProvider/pull/60.patch"},"body":"I had to just make some stubs and then register their correct output schema formats after checking to see how Swashbuckle itself does it for their testing.  So it seems there's not a unified useful way to represent a 'file' yet.\r\n\r\nbut this at least generates the expected swagger formats in the doc, so it can be used as input when testing the provider.\r\n\r\nSee \r\n[swashbuckle file download controller](https://github.com/domaindrivendev/Swashbuckle/blob/master/Swashbuckle.Dummy.Core/Controllers/FileDownloadController.cs)\r\n[swashbuckle file upload controller](https://github.com/domaindrivendev/Swashbuckle/blob/master/Swashbuckle.Dummy.Core/Controllers/FileUploadController.cs)\r\n[swashbuckle file upload registrations](https://github.com/domaindrivendev/Swashbuckle/blob/master/Swashbuckle.Dummy.Core/SwaggerExtensions/AddFileUploadParams.cs)\r\n[swashbuckle file download registrations](https://github.com/domaindrivendev/Swashbuckle/blob/master/Swashbuckle.Dummy.Core/SwaggerExtensions/UpdateFileDownloadOperations.cs)\r\n\r\nI had to add more to our 'file download' registration because the key is to have the response be of type 'file' as well, so we can key Swagger Provider off of that."},"comment":{"url":"https://api.github.com/repos/fsprojects/SwaggerProvider/issues/comments/292786873","html_url":"https://github.com/fsprojects/SwaggerProvider/pull/60#issuecomment-292786873","issue_url":"https://api.github.com/repos/fsprojects/SwaggerProvider/issues/60","id":292786873,"user":{"login":"sergey-tihon","id":1197905,"avatar_url":"https://avatars3.githubusercontent.com/u/1197905?v=3","gravatar_id":"","url":"https://api.github.com/users/sergey-tihon","html_url":"https://github.com/sergey-tihon","followers_url":"https://api.github.com/users/sergey-tihon/followers","following_url":"https://api.github.com/users/sergey-tihon/following{/other_user}","gists_url":"https://api.github.com/users/sergey-tihon/gists{/gist_id}","starred_url":"https://api.github.com/users/sergey-tihon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergey-tihon/subscriptions","organizations_url":"https://api.github.com/users/sergey-tihon/orgs","repos_url":"https://api.github.com/users/sergey-tihon/repos","events_url":"https://api.github.com/users/sergey-tihon/events{/privacy}","received_events_url":"https://api.github.com/users/sergey-tihon/received_events","type":"User","site_admin":false},"created_at":"2017-04-09T13:47:31Z","updated_at":"2017-04-09T13:47:31Z","body":"@baronfel thank you for all your effort here!\r\n\r\nYou definitely could open PR to `FSharp.TypeProviders.StarterPack` - it deserves discussion. I do not personally know, why current TP API does not allow emitting usage of DU cases....\r\n\r\nI am not sure about `Httpfs`+`Hopac`... It is definitely an option, but I think that goal for Swagger Provider is wide platform support - not only `net40` but `pcl`(`xamarin`) as well, and `Fable` one day.  Neither `Httpfs` nor `Hopac` provide `pcl` compatible binaries as of today.\r\n\r\nThe primary reason behind `Httpfs` is nice F#-friendly API\r\n\r\n> It isn't intended as a high-performance library, usability from F# has been the goal. It shouldn't be much worse than HttpWebRequest, but you'd have to test it if that was important.\r\n\r\nBut we are not going `Httpfs`(and `Hopac`) to TP users, all these usability improvements will be hidden behind provided method.\r\n\r\nThe only runtime dependency that we really need is serializer and for not it is `JSON.NET`, all other libraries are really optional we should carefully decide which ones we really need.\r\n\r\n@baronfel In your opinion, how hard will be to implement out own http communication directly based on `HttpWebRequest`? I guess that we use pretty small subset `Httpfs` /`Http.fs` features"}}
{"actor":{"display_login":"sergey-tihon"}}