The solenoid is 2ohm, which comes out to 12.5A. The 1N4007 is rated for 1A continuous, 30A surge. Would it fall under surge?
Diode is not conducting when solenoid is turned on and drawing 12.5A, rather the diode is turned off (reversed biased) during that time. The diode conducts when the solenoid is turned off and the collapsing magnetic field creates a reversed polarity voltage spike that then turns on the diode (forward biased) and allow the current to recirculate between the coil resistance and the diode for several cycles. 30A surge rating is fine. The field is consumed in just a microsecond or so.
Lefty