File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -2702,10 +2702,6 @@ schema at `#/components/schemas/Cat` is "Cat". Therefore, when using
2702
2702
` discriminator` , _inline_ schemas will not be considered because they don't have
2703
2703
a "name".
2704
2704
2705
- Schema names are scoped to the OpenAPI document they are defined in. That means
2706
- if OpenAPI document "A" references a schema in OpenAPI document "B", the schema
2707
- names in "A" aren't considered when evaluating the referenced schema in "B".
2708
-
2709
2705
# #### Fixed Fields
2710
2706
Field Name | Type | Description
2711
2707
---|:---:|---
@@ -2776,11 +2772,6 @@ For example:
2776
2772
` ` ` yaml
2777
2773
components:
2778
2774
schemas:
2779
- MyResponseType:
2780
- oneOf:
2781
- - $ref: '#/components/schemas/Cat'
2782
- - $ref: '#/components/schemas/Dog'
2783
- - $ref: '#/components/schemas/Lizard'
2784
2775
Pet:
2785
2776
type: object
2786
2777
required:
@@ -2818,12 +2809,7 @@ components:
2818
2809
type : boolean
2819
2810
` ` `
2820
2811
2821
- The ` MyResponseType` schema will use the discriminator defined by the `Pet`
2822
- schema because it is part of the `Cat`, `Dog`, and `Lizard` schemas in the
2823
- ` oneOf` . The behavior if not all schemas define a `discriminator` and they are
2824
- not all the same is undefined.
2825
-
2826
- Validated against the `MyResponseType` schema, a payload like this :
2812
+ Validated against the ` Pet` schema, a payload like this:
2827
2813
2828
2814
` ` ` json
2829
2815
{
You can’t perform that action at this time.
0 commit comments