You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow nullable properties in a Specter file, with syntax influenced by the nullable type RFC. In the example below, the jobTitle is considered nullable.
For property values prepended with a question mark ?, the generator will return either the result of the faker generator or a null value for some percentage of the results. The result must respect the seed value so that the results are repeatable. For string values, the return should be a null rather than an empty string.
The percentage of null returns is up for debate. I think 25% is a reasonable starting point.
Scope
This does not implement optional properties - where a property 'jobTitle' might be missing from the result altogether. This only addresses optional values.
The text was updated successfully, but these errors were encountered:
Feature
Allow nullable properties in a Specter file, with syntax influenced by the nullable type RFC. In the example below, the
jobTitle
is considered nullable.Implementation
For property values prepended with a question mark
?
, the generator will return either the result of the faker generator or a null value for some percentage of the results. The result must respect the seed value so that the results are repeatable. For string values, the return should be a null rather than an empty string.The percentage of null returns is up for debate. I think 25% is a reasonable starting point.
Scope
This does not implement optional properties - where a property 'jobTitle' might be missing from the result altogether. This only addresses optional values.
The text was updated successfully, but these errors were encountered: