Skip to content

Commit ae0ce6b

Browse files
author
Ron
authored
Merge pull request #1603 from MikeRalphson/code-block-headings
Do not rely on auto-detection of fenced code block languages
2 parents cdaab0d + c4841c7 commit ae0ce6b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

versions/3.0.2.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens
13721372

13731373
##### Media Type Examples
13741374

1375-
```js
1375+
```json
13761376
{
13771377
"application/json": {
13781378
"schema": {
@@ -2689,7 +2689,7 @@ The discriminator object is legal only when using one of the composite keywords
26892689

26902690
In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:
26912691

2692-
```
2692+
```yaml
26932693
MyResponseType:
26942694
oneOf:
26952695
- $ref: '#/components/schemas/Cat'
@@ -2700,7 +2700,7 @@ MyResponseType:
27002700
which means the payload _MUST_, by validation, match exactly one of the schemas described by `Cat`, `Dog`, or `Lizard`. In this case, a discriminator MAY act as a "hint" to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:
27012701

27022702

2703-
```
2703+
```yaml
27042704
MyResponseType:
27052705
oneOf:
27062706
- $ref: '#/components/schemas/Cat'
@@ -2712,7 +2712,7 @@ MyResponseType:
27122712

27132713
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:
27142714

2715-
```
2715+
```json
27162716
{
27172717
"id": 12345,
27182718
"pet_type": "Cat"
@@ -2723,7 +2723,7 @@ Will indicate that the `Cat` schema be used in conjunction with this payload.
27232723

27242724
In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional `mapping` definition MAY be used:
27252725

2726-
```
2726+
```yaml
27272727
MyResponseType:
27282728
oneOf:
27292729
- $ref: '#/components/schemas/Cat'
@@ -2745,7 +2745,7 @@ In both the `oneOf` and `anyOf` use cases, all possible schemas MUST be listed e
27452745

27462746
For example:
27472747

2748-
```
2748+
```yaml
27492749
components:
27502750
schemas:
27512751
Pet:
@@ -2787,7 +2787,7 @@ components:
27872787
27882788
a payload like this:
27892789
2790-
```
2790+
```json
27912791
{
27922792
"pet_type": "Cat",
27932793
"name": "misty"
@@ -2796,7 +2796,7 @@ a payload like this:
27962796

27972797
will indicate that the `Cat` schema be used. Likewise this schema:
27982798

2799-
```
2799+
```json
28002800
{
28012801
"pet_type": "dog",
28022802
"bark": "soft"
@@ -3306,7 +3306,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens
33063306
}
33073307
```
33083308

3309-
```YAML
3309+
```yaml
33103310
type: oauth2
33113311
flows:
33123312
implicit:

0 commit comments

Comments
 (0)