add generate() support for optional and wildcard params