security schemes serialization improvements