There is no IATA requirement to indicate full legal names, but as a matter of practicality your name appearing on all of your travel documents should be consistent.
Airlines subscribe to IATA guidelines, and their systems should be built in-kind (i.e., frequent flyer crediting linkages).