How do I regenerate the XML documentation for a class if I change the scripting API from the source code?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Will Nations
:warning: Old Version Published before Godot 3 was released.

I’ve made changes to the _bind_methods function for a class and I want to update the documentation for the class as part of the PR I intend to submit. How do I go about updating the XML files with new generated content that includes my changes so that I can add the new descriptions accordingly?

:bust_in_silhouette: Reply From: Will Nations

You can run godot --doctool <path> to dump the generated XML files. Running just godot --doctool . will put them where they are supposed to be in the main /godot/ folder and will merge them in with the existing XML docs. In this scenario, godot is the name of the path and name to your godot executable, for example ./bin/godot.x11.tools.64 would be a path from the godot directory root.

Note that this will regenerate the entire XML documentation. There is currently no way to individually update an XML file. This is because the scripting API used to all be in one XML file and was only separated into individual files during the 3.0 release. The command line interface has not been updated to reflect that change, so there is no way (as of yet) to update only a single file.