[13:59:10] Hi there! Can we discuss the MediaWiki API here? [14:04:22] Roj: yes, please ask your actual question :-) [14:07:17] Is there something machine-readable like `paraminfo` existing, but for the returned results? [14:28:11] Roj: not exactly, I believe. examples of responses, and general descriptions of what they are, are typically in the `help` module, as well as on-wiki under pages like https://www.mediawiki.org/wiki/API:Main_page [14:28:46] Do you know if anyone has worked on one? [14:29:01] Or are there any official plans to have something like that? [14:29:25] Roj: also for a lot of modules, the majority of the response are key-value pairs under a "props" object which directly reflects the "props" parameter, so these response properties are effectively documented on `paraminfo` as well, e.g. https://www.mediawiki.org/wiki/API:Siteinfo siteprop= directly controls the response and has each prop documented, same for https://www.mediawiki.org/wiki/API:Tokens and for each of the `type` values. [14:29:50] Roj: not that I'm aware of, what is the use case for making that machine-readable? [14:30:04] I want to convert them to TypeScript declarations. [14:30:13] I have already converted the parameters. [14:33:36] Roj: I see. Well, in general the responses reflect the url quite precisely, action=query -> { query: .. }, action=query meta=tokens -> { query: { tokens: .. } }. However in if the end-user is in control of the query, e.g. a generic `ajax()` method or some such, then the same end-user is also expected to know and/or document in that calling code what they expect the return to be, the generic method couldn't know statically. If you are [14:33:37] providing a library with a fixed set of utility methods for a specific number of APIs (e.g. getSiteinfo, getPrefixsearch, getTokens etc) then you could indeed follow the wiki page examples to form the basis of those types. [14:34:14] Roj: another thing that might be useful, and is machine-readable, is the example queries. You can run those and inspect the result as being the shape of the response. The shape is expected to be deterministic when using formatversion=2. [14:34:29] that is, assuming you don't expose props= to the end-user as variable parameter.