The second schematic shows a ground at the bottom even though that circuit is part of the live line side of things.
The first schematic seems to be conceptually in order though. I think C7 could be considered an optional component but I have seen quite a few SMPS with a small snubber capacitor between the primary and secondary circuits just the same.
You find them in every circuit I've ever seen, so I wouldn't call them 'optional' - I imagine it's probably crucial to their noise performance?.