If you use STLink it's I guess called "connect under reset", but like already said, the NRST has to be wired up to the programmer to work out like that.
Basically it's true, that you only need SWDIO and SWCLK, but if you assign the SWD pins of the mcu as GPIO or other AFIO, then you need to use the NRST to enter the bootloader mode to newly programm the flash memory - otherwise you stay locked out