I think that the switch would be “normally open” when the flap is closed so in its current disconnected state it is “telling the car” that the flap is constantly closed. I would recommend getting a secondhand switch With the connector still on it. (there should be lots around. A2Steve?). you will also need the flap latch too (sane source?).
Best do that than risk shorting it out? just in case? After all the real solution is to replace it and repair the latch so that it is functioning properly?
Steve B