spec for optional key