For endpoints returning models, we can use the ResponseTypeAttribute
to tell the help page documentation what the return data will look like:
/// <summary>
/// returns the specified Foo.
/// </summary>
[ResponseType(typeof(FooModel))]
[HttpGet]
[Route("~/api/foos/{fooId}")]
public async Task<IHttpActionResult> GetFoo(int fooId)
{
...
}
This will make a nice entry on the Api Help page, describing how this endpoint will behave.
I want to document that a certain endpoint will return an application/zip binary stream. How can I do that?
Well if you already know that your api endpoint going to return zip file then you can set it hard-coded to application/octet-stream
.
content-type = "application/octet-stream"