data-driven javascript API validation