schemars/docs/examples/3-custom_settings.md
2019-12-26 22:00:47 +00:00

476 B

layout title parent nav_order summary
default Custom Schema Settings Examples 3 Generating a schema using custom settings which changes how Option<T> is handled.

Custom Schema Settings

The gen module allows you to customise how schemas are generated. For example, the default behaviour for Option<T> is to include null in the schema's types, but we can instead add a nullable property to its schema:

{% include example.md name="custom_settings" %}