Create middleware spec