Describing REST APIs with HTML5 forms

There are several options for describing APIs in a way that machines and/or people can read: WSDL files (mostly used with SOAP), OpenSearch description files, YQL Open Data Tables, etc.

I had a theory that REST APIs could be sufficiently described — in a way that both machines and people can understand — using HTML5 forms.

Here's an example, describing the NCBI's ESearch API (part of EUtils):

This makes use of several new or modified HTML5 attributes on input and select elements: "type", "required", "pattern", "placeholder" and "autofocus".

The description needs to be able to define:

Still needed: a way to express dependencies between fields (e.g. "either this or these are required").

Deliberately missing: any definition of the structure or semantics of the response.

Here's another example, for EFetch. This one is missing optgroup elements, while I investigate the different combinations of parameters.