Skip to content

Commit b2db2e9

Browse files
committed
Expanded representations examples
1 parent bee3369 commit b2db2e9

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

versions/3.0.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ representations:
840840

841841
#### <a name="representationsObject"></a>Representations Object
842842

843-
Describes a set of supported representations. A representations object can be used in [requestBody](#requestBody), [response objects](#responseObject) and [parameter objects](#parameterObject) to describe complex parameters.
843+
Describes a set of supported representations. A representations object can be used in [requestBody](#requestBody) and [response objects](#responseObject).
844844

845845
Each key in the representations object is the media-type of the [Representation Object](#representationObject).
846846

@@ -849,15 +849,29 @@ Each key in the representations object is the media-type of the [Representation
849849
```js
850850
"representations" : {
851851
"application/json": {
852+
'application/json':
853+
852854
"schema": {
853855
"type": "array",
854856
"items": {
855857
"type": "string"
856858
}
857859
},
858-
"examples": []
860+
"examples": [
861+
["Bob","Diane","Mary","Bill"],
862+
[]
863+
]
859864
},
860-
"application/xml" : {}
865+
"application/xml" : {
866+
"examples" : [
867+
"<Users><User name='Bob'/><User name='Diane'/><User name='Mary'/><User name='Bill'/></Users>",
868+
"<Users/>"
869+
]
870+
},
871+
"text/plain" : {
872+
"Bob,Diane,Mary,Bill",
873+
""
874+
}
861875
}
862876
```
863877

@@ -868,7 +882,21 @@ representations:
868882
type: array
869883
items:
870884
type: string
871-
'application/xml': {}
885+
examples:
886+
-
887+
- Bob
888+
- Diane
889+
- Mary
890+
- Bill
891+
- {}
892+
893+
'application/xml':
894+
examples:
895+
- "<Users><User name='Bob'/><User name='Diane'/><User name='Mary'/><User name='Bill'/></Users>"
896+
- "<Users/>"
897+
'text/plain':
898+
examples:
899+
- "Bob,Diane,Mary,Bill"
872900
```
873901

874902
#### <a name="representationObject"></a>Representation Object

0 commit comments

Comments
 (0)