3

I'm developing an API that outputs a different response based on the user, and I'm currently using the ResponseType attribute to describe the type of response that's returned, but this only allows me to specify one type of response, which will differ between users.

Is there any way I can customise the help pages to display the response type that the user will get?

Tom
  • 1,561
  • 4
  • 20
  • 29
  • You can apply multiple `ResponseType` attributes to a single method, so it's not true that you can only specify one type of response. – Damien_The_Unbeliever Mar 14 '14 at 09:14
  • OK, thanks, I didn't know that. So that gets me a bit closer, although I'd prefer it if the user is only shown the response type that they receive. – Tom Mar 14 '14 at 09:19

1 Answers1

3

HelpPage does not support these dynamic response types and relies on available static information.

HelpPage doesn't support multiple response types as mentioned earlier...the fact that we are allowing multiple attributes of ResponseType is a bug...as per current code logic, even if you supply multiple attributes, we only pick one...

Kiran
  • 56,921
  • 15
  • 176
  • 161
  • 2
    Thank you for the clarification! Do you think this will be supported in any future vesions? – Tom Mar 17 '14 at 13:43
  • 2
    I would also appreciate this feature allowing multiple ResponseTypes! – niklr Mar 31 '14 at 11:08
  • I third that, is there a bug report available that we can submit against? Do you know if there's nightly support for this yet? – wonea Apr 23 '14 at 10:38
  • At a minimum, it'd be nice to be able to include multiple response types so that `BadRequestErrorMessageResult` could be decorated to go along with `ResultOk` or `OkNegotiatedContentResult`. Both might be flavors of `HttpStatusCode`, but `HttpStatusCode` does not properly define what can be expected in the response (are there messages? Is there an object?) – Ellesedil May 28 '14 at 18:20