Various sources are saying that there isn't a way to repair weapons. Part of the games strategy is to rotate out weapons so you can make them last longer.
Unfortunately, switching weapons constantly is part of the challenge and strategy of The Legend of Zelda: Breath of the Wild. Because of this, you can’t repair weapons so they will all explode eventually
However, there appears to be one way to repair items, though I believe this is not a legit way and likely will be patched as it sounds more like an exploit. Nonetheless, one user on GameFAQS discovered that Octorok enemies can suck up items and after being killed, will drop them again fully repaired:
There is a way to repair them.
The octorok enemies that suck in air before they shoot can also suck in items. If they suck in your weapons and you kill them they will drop your weapons back with full durability.
Someone also stated on that thread that doing this cleans the rust of weapons as well.