Dioxygenase; part of the gene cluster that mediates the biosynthesis of swainsonine (SW), a cytotoxic fungal alkaloid and a potential cancer therapy drug (PubMed:28381497, PubMed:32786262). Swainsonine production occurs via a multibranched pathway and is dispensable for fungal colonization of plants and infection of insect hosts (PubMed:32786262). The first step of swainsonine biosynthesis is the production of the precursor pipecolic acid (PA) via conversion of L-lysine (Lys) to 1-piperideine-6-carboxylate (P6C) by the aminotransferase swnA, the latter being further reduced to PA by the reductase swnR (PubMed:32786262). PA can be converted from lysine by both the SW biosynthetic cluster and the unclustered genes such as lysine cyclodeaminase (PubMed:32786262). The PKS-NRPS hybrid synthetase swnK uptakes and condensates PA and malonyl-CoA with and without skipping of the ketoreductase (KR) domain in order to produce 3 intermediates, 1-oxoindolizidine, (1S)-1-hydroxyindolizin, and (1R)-1-hydroxyindolizine; with the transisomer (1S)-1-hydroxyindolizin being predominant (PubMed:32786262). The terminal thioester reductase (TE) domain of swnK is involved in reduction of the thioester bond to release the intermediate aldehydes (PubMed:32786262). The oxidoreductase swnN could contribute to the reduction of 1-oxoindolizidine to (1S)-1-hydroxyindolizin and (1R)-1-hydroxyindolizine, contributing to the major route of SW production (Probable). The dioxygenase swnH2 would be responsible for the oxidization of (1R)-1-hydroxyindolizine into (1R,2S)-1,2-dihydroxyindolizine and of (1S)-1-hydroxyindolizin to yield both (1R,2S)-1,2-dihydroxyindolizine and (1S,2S)-1,2-dihydroxyindolizine (PubMed:32786262). The dioxygenase swnH1 then performs the conversion of the 1,2-dihydroxyindolizine epimers to SW (PubMed:32786262). Mycotoxin biosynthesis. Homodimer. Abolishes the production of swainsonine but still produces the 1,2-dihydroxyindolizine epimers intermediates. Belongs to the PhyH family.