This project is read-only.

"Help" not taking handlers into consideration

Topics: Web Api
Feb 13, 2012 at 9:07 AM

We're doing some transforms in some handlers to convert resources into representations for different versions of our API. Unfortunately the HelpPage generation doesn't take this into consideration but also there don't seem to be any hooks to plug in sample data generators.

I understand that generating sample messages based on all sorts of bespoke ways to transform the message could be tricky which is why I was hoping for some hooks to be able to plug in some of our own sample generation. Perhaps we need to implement our own documentation generator but it would be good to know if there are plans to enhance the extensibility in this area.

Feb 13, 2012 at 5:17 PM

I already created an issue for this.

Can't find it in the search so it is probably lost in the void. I requested that /help pages are not affected by anything.

And also that they add a way to add handlers etc to the help pages specifically. 

Feb 14, 2012 at 10:33 AM
Edited Feb 14, 2012 at 10:48 AM

This looks like your issue 

Your assertion that the default config is applied to help was a good pointer so I tried it to see if I could repro your issue (and potentially my solution) where the handlers are applied to Help. Unfortunately it didn't appear to affect the sample data being generated, it still used the return values from the service rather than my transforms. I should raise this as a separate issue because even allowing a separate collection of handlers (unless they somehow have different behaviour) isn't going to help me.

I also voted up your issue as it's something I'll need too!