Add example for custom schema setings
This commit is contained in:
parent
f387a0ec56
commit
601fc3aaad
5 changed files with 201 additions and 0 deletions
13
docs/examples/3-custom_settings.md
Normal file
13
docs/examples/3-custom_settings.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
layout: default
|
||||
title: Custom Schema Settings
|
||||
parent: Examples
|
||||
nav_order: 3
|
||||
summary: 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 `type`s, but we can instead add a `nullable` property to its schema:
|
||||
|
||||
{% include example.md name="custom_settings" %}
|
Loading…
Add table
Add a link
Reference in a new issue