Change how required parameters are represented in URI Templates #3989
Labels
enhancement
New feature or request
generator
Issues or improvements relater to generation capabilities.
WIP
Milestone
Currently all parameters are rendered in URI templates like this:
I would like us to consider changing the way required parameters are presenting. Consider paramA and paramB are optional, but paramC is required, the URI Template would be
With this approach, query parameters that are required but allow an empty value, do not require the application developer to explicitly set the empty value.
The other advantage is that when using this URI Template for documentation/debugging purposes it is very clear which parameters are required vs optional.
This approach also produces a more stable URL as the order of query parameters is impacted less due to the presence of optional parameters. This is helpful to prevent HTTP cache pollution.
The text was updated successfully, but these errors were encountered: