A gymnosperm is any vascular plant that reproduces by open seed, or, unlike angiosperms, an ovary, or a flowering plant whose seeds are bound by a mature ovary or fruit.
The seeds of many gymnosperms are born in cones and do not appear until maturity.
Onion is not a gymnosperm, but an angiosperm.
Angiosperms are plants that produce flowers and have their seeds in fruits.