We have files in Git with no extension that are actually wikitext and others that are plain text. Other files end in `.txt` (which doxygen garbles, {T106116}); some are actually wikitext, and others are structured text.
Per [[ https://www.mediawiki.org/wiki/Manual:Coding_conventions#Text_files | Manual:Coding conventions#Text files ]] (wut spage just rote, so it's unreviewed), actual wikitext files should end with `.mediawiki`, and most plain text files could easily be massaged into Markdown files that should end with `.md`.
I think it's pretty safe to `git mv` files in core to give them the right extension, hence tagging this easy. The doc is only regenerated on +2, so you should test your changes locally: install the same version of doxygen that jenkins-bot's https://integration.wikimedia.org/ci/job/mediawiki-core-doxygen-publish/12245/console | mediawiki-core-doxygen-publish task uses ([[ https://integration.wikimedia.org/ci/job/mediawiki-core-doxygen-publish/12245/consoleFull | sample run ]]), then rebuild core's documentation with `maintenance/mwdocgen.php`.