Originally filed on GitLab.com
Used by https://github.com/Krinkle/pywiki-fileprotectionsync/blob/master/fileprotectionsync.py#L52
mwapi_responses uses JSON files to represent structs that the API responds with, see https://gitlab.wikimedia.org/repos/mwbot-rs/mwbot/-/tree/main/mwapi_responses_derive/data. You'll need to create a new one for prop=images, which is documented at https://www.mediawiki.org/wiki/API:Images. Then you can automatically generate test cases (see https://gitlab.wikimedia.org/repos/mwbot-rs/mwbot/-/blob/main/mwapi_responses/gen_tests.py) and verify they pass.
Also take a look at mwbot-rs's contributing instructions.