Most people who add microswitches normaly use something like the following circuit on a Digital in Pin.
When the Switch is open there is no current flow; and when the switch is closed there is a flow of about 5 mA.
While this is good for a simple status switch, on short leads.
When you want to know more information about the state of the switch, you can move to the following circuit:
With a small change of resistor values, and adding a forth resistor you can detect the curent status of the switch, regardless of if it is open, closed or missing. Adding a small capacitor gives a small amount of EMC resilience and limits contact bounce.