Cut off ends of green beans and slice in half. Cook green beans in boiling water until just tender, about 7-10 minutes. Drain and set aside.
In a large skillet over medium heat melt butter add in chopped onion and mushrooms and cook and stir until tender, about 5-7 minutes.
Stir in flour and spices until well combined. Gradually stir in milk and bring to a boil until thick, stirring frequently
Once it has thickened, remove from heat and blend in 1 cup of the shredded Swiss cheese
Mix in the cooked green beans and turn into a shallow baking dish, if you don't have an oven safe skillet. Sprinkle with remaining 1/2 C of shredded Swiss cheese.
Bake uncovered until heated through, about 30 minutes.