{"action":"closed","issue":{"url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/issues/796","repository_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle","labels_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/issues/796/labels{/name}","comments_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/issues/796/comments","events_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/issues/796/events","html_url":"https://github.com/domaindrivendev/Swashbuckle/issues/796","id":160701765,"number":796,"title":"Model schema for multipart header","user":{"login":"griggsrl","id":3331954,"avatar_url":"https://avatars.githubusercontent.com/u/3331954?v=3","gravatar_id":"","url":"https://api.github.com/users/griggsrl","html_url":"https://github.com/griggsrl","followers_url":"https://api.github.com/users/griggsrl/followers","following_url":"https://api.github.com/users/griggsrl/following{/other_user}","gists_url":"https://api.github.com/users/griggsrl/gists{/gist_id}","starred_url":"https://api.github.com/users/griggsrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griggsrl/subscriptions","organizations_url":"https://api.github.com/users/griggsrl/orgs","repos_url":"https://api.github.com/users/griggsrl/repos","events_url":"https://api.github.com/users/griggsrl/events{/privacy}","received_events_url":"https://api.github.com/users/griggsrl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-16T16:16:03Z","updated_at":"2016-08-12T20:11:32Z","closed_at":"2016-08-12T20:11:32Z","body":"Hi, is there a way to specify a model schema when using a multipart POST/PUT request? We're sending both a file and a JSON string mapped to one of our classes and currently no model schema shows up in the generated documentation. What we'd like to add is minimally a model schema for the custom class object (in the example below a Document). I don't see a way to do this currently, at least through the documentation and what I could find on the web.\r\n\r\nOur methods are pretty straight forward and not sure if it's helpful but here's what we have:\r\n\r\n    [ValidateModel]\r\n    [HttpPost]\r\n    [ValidateMimeMultipartContent]\r\n    [Route(Name = \"CreateNewDocument\")]\r\n    [SwaggerResponse(HttpStatusCode.Created, null, typeof(Document))]\r\n    [SwaggerResponse(HttpStatusCode.InternalServerError)]\r\n    [SwaggerResponse(HttpStatusCode.BadRequest)]\r\n    [SwaggerResponse(HttpStatusCode.Unauthorized)]\r\n    public async Task<HttpResponseMessage> Post()\r\n    {\r\n            ...\r\n            Document value = null;\r\n            ...\r\n            var provider = new MultipartFormDataStreamProvider(tempPath);\r\n\r\n            // Read the form data.\r\n            var allData = await Request.Content.ReadAsMultipartAsync(provider);\r\n\r\n            string documentJson = allData.FormData[\"DocumentModel\"].NormalizeJson();\r\n\r\n            // get document data\r\n            value = JsonConvert.DeserializeObject<Document>(documentJson);\r\n            ...\r\n    }"}}
{"actor":{"display_login":"domaindrivendev"}}