Syncthing setting folder type declarativly

I want to set the folder type in syncthing declarative (i.e., receiveonly, sendreceive…). What I tried was setting the services.syncthing.settings.folders.<name>.type setting to recieveonly but the type folder is still sendreceive in syncthing. When I investigated the syncthing module, it seems to curl the syncthing API instead of just generating the XML file.

Has anybody managed to declarative set the folder type in the syncthing service?

This is not my code, nor did I test, but I found this single repo on GitHub that “seems” to use this setting.