Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions versions/3.0.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2707,15 +2707,15 @@ MyResponseType:
- $ref: '#/components/schemas/Dog'
- $ref: '#/components/schemas/Lizard'
discriminator:
propertyName: pet_type
propertyName: petType
```

The expectation now is that a property with name `pet_type` _MUST_ be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:
The expectation now is that a property with name `petType` _MUST_ be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:

```json
{
"id": 12345,
"pet_type": "Cat"
"petType": "Cat"
}
```

Expand All @@ -2731,7 +2731,7 @@ MyResponseType:
- $ref: '#/components/schemas/Lizard'
- $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
discriminator:
propertyName: pet_type
propertyName: petType
mapping:
dog: '#/components/schemas/Dog'
monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
Expand All @@ -2751,12 +2751,12 @@ components:
Pet:
type: object
required:
- pet_type
- petType
properties:
pet_type:
petType:
type: string
discriminator:
propertyName: pet_type
propertyName: petType
mapping:
dog: Dog
Cat:
Expand Down Expand Up @@ -2789,7 +2789,7 @@ a payload like this:

```json
{
"pet_type": "Cat",
"petType": "Cat",
"name": "misty"
}
```
Expand All @@ -2798,7 +2798,7 @@ will indicate that the `Cat` schema be used. Likewise this schema:

```json
{
"pet_type": "dog",
"petType": "dog",
"bark": "soft"
}
```
Expand Down