It's fairly simple with dinosaurs, imo. If it flies or swims - it's not a dinosaur. So plesiosaurs, mosasaurs, ichthyosaurs are not dinos. Se goes for pterosaurs. It's terrestrial animals where it gets difficult
Rule of thumb, it's not perfect. Plus AFAIK archaeopteryx was more of a glider, rather than a dedicated flyer (the way pterodactyl was). You can also tell bird-like theropods from pterosaurs by the legs - birds have long-ish legs, while pterosaurs have short-ish legs (like bats).
As for the spinosaurs, while a swimmer (it's hard to keep track, poor sod is getting retconned every other day) it was not an open sea kind of swimmer - just compare spinosaur's limbs to that of a mosasaur