The convention for an idealized spring in such a schematic is that the lateral stiffness is zero but also that it does not move out of its original orientation with respect to its base (i.e., it does not tilt). The idealized spring is characterized by only one parameter: the axial stiffness. (It is thus assumed that the axial deflections are sufficiently small that the stiffness is constant and displacement independent. This assumption holds for small perturbations of any stable solid.)
Since the lateral stiffness is zero, other constraints must limit a body's motion in the directions orthogonal to the spring axis. This can be seen in your second schematic, in which each degree of freedom is constrained by the axial stiffness of one or more springs. In contrast, your first diagram is not well defined: the block should accelerate to the right for any positive $F$, which then results in a discrepancy because a real spring would naturally resist such acceleration. To indicate this resistance, you'd either add a pseudospring with horizontal orientation or move away from lumped components altogether, perhaps modeling the spring using the method of compliant joints or by finite element analysis.
A good source of sample schematics for springs and rigid bodies is vibration textbooks, e.g., Tongue's Principles of Vibrations. Thorough and rigorous textbooks will emphasize that the block in your first diagram must be constrained (e.g., by walls) from moving left or right or in or out of the screen/page.