provide example of optional and required query param examples and generative based encoding