Skip to content

Commit

Permalink
chore(docs): update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
CarstenWickner committed Nov 11, 2024
1 parent b3539da commit e637b3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### `jsonschema-generator`
#### Added
- new `Option.NULLABLE_ALWAYS_AS_ANYOF` that avoids the `"null"` type being included with other type values, e.g. `"type": ["object", "null"]`

#### Changed
- apply property name overrides before triggering the ignore check (i.e., provide both the declared and overridden property names if there is one)
- update various (runtime/test/build-time) dependencies
Expand Down
11 changes: 10 additions & 1 deletion slate-docs/source/includes/_main-generator-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ configBuilder.without(
<td rowspan="2" style="text-align: right">36</td>
<td colspan="2"><code>Option.ALLOF_CLEANUP_AT_THE_END</code></td>
</tr>
<tr><th>#</th><th>Behavior if included</th><th>Behavior if excluded</th></tr>
<tr>
<td>At the very end of the schema generation reduce <code>allOf</code> wrappers where it is possible without overwriting any attributes – this also affects the results from custom definitions.</td>
<td>Do not attempt to reduce <code>allOf</code> wrappers but preserve them as they were generated regardless of them being necessary or not.</td>
</tr>
<tr><th>#</th><th>Behavior if included</th><th>Behavior if excluded</th></tr>
<tr>
<td rowspan="2" style="text-align: right">37</td>
<td colspan="2"><code>Option.STRICT_TYPE_INFO</code></td>
Expand All @@ -349,6 +349,14 @@ configBuilder.without(
<td>As final step in the schema generation process, ensure all sub schemas containing keywords implying a particular "type" (e.g., "properties" implying an "object") have this "type" declared explicitly – this also affects the results from custom definitions.</td>
<td>No additional "type" indication will be added for each sub schema, e.g. on the collected attributes where the "allOf" clean-up could not be applied or was disabled.</td>
</tr>
<tr>
<td rowspan="2" style="text-align: right">38</td>
<td colspan="2"><code>Option.NULLABLE_ALWAYS_AS_ANYOF</code></td>
</tr>
<tr>
<td>A "type": "null" will not be combined with other "type" values in an array. Instead, a separate "anyOf" with a subschema only containing the "type": "null" will be included.</td>
<td>For brevity's sake, a "type": "null" may be combined with other "type" values, e.g. as "type": ["null", "object"].</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -397,3 +405,4 @@ Below, you can find the lists of <code>Option</code>s included/excluded in the r
| 35 | `PLAIN_DEFINITION_KEYS` | ⬜️ | ⬜️ | ⬜️ |
| 36 | `ALLOF_CLEANUP_AT_THE_END` ||||
| 37 | `STRICT_TYPE_INFO` | ⬜️ | ⬜️ | ⬜️ |
| 38 | `NULLABLE_ALWAYS_AS_ANYOF` | ⬜️ | ⬜️ | ⬜️ |

0 comments on commit e637b3b

Please sign in to comment.