Skip to content

Commit 19d5088

Browse files
committed
Update docs
1 parent 1480138 commit 19d5088

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/src/content/docs/advanced.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,4 +488,6 @@ Pet: components["schemas"]["Cat"] | components["schemas"]["Dog"] | components["s
488488
Cat: { type?: "cat"; } & components["schemas"]["PetCommonProperties"];
489489
```
490490
491+
_Note: you optionally could provide `discriminator.propertyName: "type"` on `Pet` ([docs](https://spec.openapis.org/oas/v3.1.0#discriminator-object)) to automatically generate the `type` key, but is less explicit._
492+
491493
While the schema permits you to use composition in any way you like, it’s good to always take a look at the generated types and see if there’s a simpler way to express your unions & intersections. Limiting the use of `oneOf` is not the only way to do that, but often yields the greatest benefits.

0 commit comments

Comments
 (0)