Skip to content

Commit 8f03349

Browse files
committed
Updating representation example
1 parent b2db2e9 commit 8f03349

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

versions/3.0.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ A Path Item may be empty, due to [ACL constraints](#securityFiltering). The path
337337
Field Name | Type | Description
338338
---|:---:|---
339339
<a name="pathItemRef"></a>$ref | `string` | Allows for an external definition of this path item. The referenced structure MUST be in the format of a [Path Item Object](#pathItemObject). If there are conflicts between the referenced definition and this Path Item's definition, the behavior is *undefined*.
340-
<a name="pathItemSummary"></a>summary | An optional, string summary, intended to apply to all operations in this path.
341-
<a name="pathItemDescription"></a>description | An optional, string description, intended to apply to all operations in this path.
340+
<a name="pathItemSummary"></a>summary| `string` | An optional, string summary, intended to apply to all operations in this path.
341+
<a name="pathItemDescription"></a>description | `string` | An optional, string description, intended to apply to all operations in this path.
342342
<a name="pathItemGet"></a>get | [Operation Object](#operationObject) | A definition of a GET operation on this path.
343343
<a name="pathItemPut"></a>put | [Operation Object](#operationObject) | A definition of a PUT operation on this path.
344344
<a name="pathItemPost"></a>post | [Operation Object](#operationObject) | A definition of a POST operation on this path.
@@ -754,7 +754,6 @@ Field Name | Type | Description
754754
---|:---:|---
755755
<a name="requestBodyDescription"></a>description | `string` | A brief description of the request body. This could contain examples of use. [GFM syntax](https://help.github.com/articles/github-flavored-markdown) can be used for rich text representation.
756756
<a name="requestBodyRepresentations"></a>representations | [Representations Object](#representationsObject) | The representations of the request body.
757-
<a name="requestBodySchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the type used for the request body.
758757
<a name="requestBodyRequired"></a>required | `boolean` | Determines if the request body is required in the request. Defaults to `true`.
759758

760759

@@ -849,8 +848,6 @@ Each key in the representations object is the media-type of the [Representation
849848
```js
850849
"representations" : {
851850
"application/json": {
852-
'application/json':
853-
854851
"schema": {
855852
"type": "array",
856853
"items": {
@@ -920,24 +917,30 @@ A representation description.
920917
{
921918
"application/json": {
922919
"schema": {
923-
"type": "object",
924-
"properties": {
925-
"type": "string"
926-
}
920+
"$ref": "#/definitions/Pet"
927921
},
928-
"examples": []
929-
},
930-
"application/xml" : {}
922+
"examples": [{
923+
"name" : "Fluffy",
924+
"petType" : "Cat"
925+
},
926+
{
927+
"name" : "Rover",
928+
"petType" : "Frog"
929+
}]
930+
}
931931
}
932932
```
933933

934934
```yaml
935935
application/json:
936936
schema:
937-
type: array
938-
items:
939-
type: string
940-
application/xml: {}
937+
$ref: "#/definitions/Pet"
938+
examples:
939+
- name: Fluffy
940+
petType: Cat
941+
- name: Rover
942+
petType: Frog
943+
941944
```
942945

943946

0 commit comments

Comments
 (0)