No definitely against the law of armed conflict and Geneva convention. Turkey wasn’t known for abiding by them in WWI (course each side had their issues occasionally), but joining NATO is supposed to mean something. Now it could just be another domino chain just like the start of that war.
I’m pretty sure the Turkmen in this region of Syria are not signatories of the Geneva Convention. Now, Syria is a signatory however the sovereignty of Syria’s claim over the Syrian Turkmen is somewhat in dispute currently.