Skip to content

Instantly share code, notes, and snippets.

@rionmonster
Created March 24, 2017 16:16
Show Gist options
  • Save rionmonster/b0d06347922cc0cd604d0ea7049b3dae to your computer and use it in GitHub Desktop.
Save rionmonster/b0d06347922cc0cd604d0ea7049b3dae to your computer and use it in GitHub Desktop.
Example
[HttpPost]
[SwaggerOperation("create-member")]
[SwaggerResponse(200)]
[SwaggerResponse(400, Description = "Invalid Parameters")]
public void Create(MemberData member)
{
// This works
}
[HttpPost]
[SwaggerOperation("create-member")]
[SwaggerResponse(200)]
[SwaggerResponse(400, Description = "Invalid Parameters")]
public void Create([FromBody]MemberData member)
{
// This doesn't work
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment