Skip to content

Commit b045145

Browse files
committed
nits/suggestions
1 parent e09854e commit b045145

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

source/code-snippets/versioned-api/options.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
const { MongoClient, ServerApiVersion } = require("mongodb");
33

44
const uri = "mongodb+srv://<user>:<password>@<cluster-url>?retryWrites=true&w=majority";
5-
const client = new MongoClient(uri, { serverApi: { strict: true, deprecationErrors: true, version: ServerApiVersion.v1 }});
5+
const client = new MongoClient(uri,
6+
{
7+
serverApi: {
8+
version: ServerApiVersion.v1,
9+
strict: true,
10+
deprecationErrors: true,
11+
}
12+
});
613
// end serverApiVersion
714

source/fundamentals/versioned-api.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ described in the following table.
105105
* - Option Name
106106
- Description
107107

108+
* - version
109+
- | **Required**. Specifies the version of the Versioned API.
110+
|
111+
| Default: **null**
112+
108113
* - strict
109114
- | **Optional**. When set, if you call a command that is not part of the declared API version, the driver raises an exception.
110115
|
@@ -115,10 +120,7 @@ described in the following table.
115120
|
116121
| Default: **false**
117122

118-
* - version
119-
- | **Required**. Specifies the version of the Versioned API.
120-
|
121-
| Default: **null**
123+
122124

123125
The following example shows how you can set the options of the ``ServerApi``
124126
interface.

0 commit comments

Comments
 (0)