Skip to main content

Replied to a post on github.com :

Swinging back to this with some idle thoughts:

I'd like to have a way to have endpoints self documenting in as far as it's possible, as I've said, or if that's not possible to have the documentation tied as close as possible to the code.

So, I'm wondering if an approach would be that a page could pass to the form template, an array of parameters and a description, as well as whether they're optional/required.

This array, if present, could then be rendered out in some way - perhaps as a commented out JSON blob... this blob would be human readable for those looking at the source, and could be machine parsable for some future API client.

Thoughts?