[REQ] Allow generators to override example creation when no examples are provided in the spec
Created by: tekerson
Is your feature request related to a problem? Please describe.
We have a custom generator and the examples are used as mock data for testing. By default, if there are no examples provided in the spec, the generator creates examples based on the schema of the response. These automatically created examples aren't desirable to be used in this context.
Describe the solution you'd like
We would like to be able to customise (or, more specifically prevent) the creation of example data when it is not explicitly provided in the spec files.
Describe alternatives you've considered
We currently have a workaround that involves post-hoc filtering of the examples list, but this currently relies on the type of the generated example being the only way that a Map
gets added to the list, which doesn't seem very reliable.
Additional context
I have created a draft PR (#8225) with a potential implementation.