Skip to content

Commit f19a59c

Browse files
author
Chris Cho
authored
DOCSP-20584: versioned API renamed to stable API (#282)
* DOCSP-20584: versioned API renamed to stable API
1 parent 6560dea commit f19a59c

File tree

8 files changed

+44
-36
lines changed

8 files changed

+44
-36
lines changed

config/redirects

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
define: prefix drivers/node
22
define: base https://docs.mongodb.com/${prefix}
3-
define: versions v3.6 master
3+
define: versions v3.6 v3.7 v4.0 v4.1 v4.2 v4.3 master
44

55
raw: ${prefix}/ -> ${base}/current/
66
raw: ${prefix}/stable -> ${base}/current/
7+
8+
[*-master]: ${prefix}/${version}/fundamentals/versioned-api/ -> ${prefix}/${version}/fundamentals/stable-api/

snooty.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ mongosh = "``mongosh``"
1313
driver = "node"
1414
driver-long = "MongoDB Node.js driver"
1515
driver-short = "Node.js driver"
16+
stable-api = "Stable API"

source/fundamentals.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Fundamentals
77
.. toctree::
88

99
/fundamentals/connection
10-
/fundamentals/versioned-api
10+
/fundamentals/stable-api
1111
/fundamentals/authentication
1212
/fundamentals/crud
1313
/fundamentals/promises

source/fundamentals/connection.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ URI to specify the behavior of the client.
265265
- string *or* enum
266266
- ``null``
267267
- Specifies the API version that operations must conform to. See the
268-
MongoDB manual entry on :manual:`Versioned API </reference/versioned-api/>`
268+
MongoDB manual entry on :manual:`Stable API </reference/stable-api>`
269269
for more information.
270270

271271
* - **srvMaxHosts**

source/fundamentals/versioned-api.txt renamed to source/fundamentals/stable-api.txt

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
=============
2-
Versioned API
3-
=============
1+
.. _nodejs-stable-api:
2+
3+
==============
4+
{+stable-api+}
5+
==============
46

57
.. default-domain:: mongodb
68

@@ -12,60 +14,62 @@ Versioned API
1214

1315
.. note::
1416

15-
The Versioned API feature requires MongoDB Server 5.0 or later.
17+
The {+stable-api+} feature requires MongoDB Server 5.0 or later.
1618

17-
You should only use the Versioned API feature if all the MongoDB
19+
You should only use the {+stable-api+} feature if all the MongoDB
1820
servers you are connecting to support this feature.
1921

2022
Overview
2123
--------
2224

23-
In this guide, you can learn how to specify the **Versioned API** when connecting to
24-
a MongoDB instance or replica set. You can use the Versioned API feature to
25-
force the server to run operations with behavior compatible with the
26-
specified **API version**. An API version defines the expected behavior of the
27-
operations it covers and the format of server responses. If you change to
28-
a different API version, the operations are not guaranteed to be
29-
compatible and the server responses are not guaranteed to be similar.
25+
In this guide, you can learn how to specify the **{+stable-api+}** when
26+
connecting to a MongoDB instance or replica set. You can use the
27+
{+stable-api+} feature to force the server to run operations with behavior
28+
compatible with the specified **API version**. An API version defines the
29+
expected behavior of the operations it covers and the format of server
30+
responses. If you change to a different API version, the operations are not
31+
guaranteed to be compatible and the server responses are not guaranteed to
32+
be similar.
3033

31-
When you use the Versioned API feature with an official MongoDB driver, you
34+
When you use the {+stable-api+} feature with an official MongoDB driver, you
3235
can update your driver or server without worrying about backward compatibility
33-
issues of the commands covered by the Versioned API.
36+
issues of the commands covered by the {+stable-api+}.
3437

35-
See the server manual page on the `Versioned API <https://docs.mongodb.com/v5.0/reference/versioned-api/>`__
38+
See the MongoDB reference page on the :manual:`{+stable-api+} </reference/stable-api/>`
3639
for more information including a list of commands it covers.
3740

38-
The following sections describe how you can enable the Versioned API for
41+
The following sections describe how you can enable the {+stable-api+} for
3942
your MongoDB client and the options that you can specify.
4043

41-
Enable the Versioned API on a MongoDB Client
42-
--------------------------------------------
44+
Enable the {+stable-api+} on a MongoDB Client
45+
---------------------------------------------
4346

44-
To enable the Versioned API, you must specify an API version in the ``MongoClientOptions``
47+
To enable the {+stable-api+}, you must specify an API version in the ``MongoClientOptions``
4548
passed to your ``MongoClient``. Once you instantiate a ``MongoClient`` instance with
4649
a specified API version, all commands you run with that client use that
47-
version of the Versioned API.
50+
version of the {+stable-api+}.
4851

4952
.. tip::
5053

5154
If you need to run commands using more than one version of the Versioned
5255
API, instantiate a separate client with that version.
5356

54-
If you need to run commands not covered by the Versioned API, make sure the
57+
If you need to run commands not covered by the {+stable-api+}, make sure the
5558
"strict" option is disabled. See the section on
56-
:ref:`Versioned API Options <versioned-api-options>` for more information.
59+
:ref:`{+stable-api+} Options <nodejs-stable-api-options>` for more
60+
information.
5761

5862
The example below shows how you can instantiate a ``MongoClient`` that
59-
sets the Versioned API version and connects to a server by performing the
63+
sets the {+stable-api+} version and connects to a server by performing the
6064
following operations:
6165

6266
- Specify a server URI to connect to.
63-
- Specify a Versioned API version in the ``MongoClientOptions`` object, using a
67+
- Specify a {+stable-api+} version in the ``MongoClientOptions`` object, using a
6468
constant from the ``ServerApiVersion`` object.
6569
- Instantiate a ``MongoClient``, passing the URI and the ``MongoClientOptions``
6670
to the constructor.
6771

68-
.. literalinclude:: /code-snippets/versioned-api/basic.js
72+
.. literalinclude:: /code-snippets/stable-api/basic.js
6973
:start-after: begin serverApiVersion
7074
:end-before: end serverApiVersion
7175
:language: javascript
@@ -74,7 +78,7 @@ following operations:
7478
.. warning::
7579

7680
If you specify an API version and connect to a MongoDB server that does
77-
not support the Versioned API, your application may throw an error when
81+
not support the {+stable-api+}, your application may throw an error when
7882
connecting to your MongoDB server with the following text:
7983

8084
.. code-block:: none
@@ -89,12 +93,13 @@ section, see the following API Documentation:
8993
- `MongoClientOptions <{+api+}/interfaces/MongoClientOptions.html>`__
9094
- `MongoClient <{+api+}/classes/MongoClient.html>`__
9195

96+
.. _nodejs-stable-api-options:
9297
.. _versioned-api-options:
9398

94-
Versioned API Options
95-
---------------------
99+
{+stable-api+} Options
100+
----------------------
96101

97-
You can enable or disable optional behavior related to the Versioned API as
102+
You can enable or disable optional behavior related to the {+stable-api+} as
98103
described in the following table.
99104

100105
.. list-table::
@@ -106,7 +111,7 @@ described in the following table.
106111
- Description
107112

108113
* - version
109-
- | **Required**. Specifies the version of the Versioned API.
114+
- | **Required**. Specifies the version of the {+stable-api+}.
110115
|
111116
| Default: **null**
112117

@@ -125,7 +130,7 @@ described in the following table.
125130
The following example shows how you can set the options of the ``ServerApi``
126131
interface.
127132

128-
.. literalinclude:: /code-snippets/versioned-api/options.js
133+
.. literalinclude:: /code-snippets/stable-api/options.js
129134
:start-after: begin serverApiVersion
130135
:end-before: end serverApiVersion
131136
:language: javascript

source/includes/fundamentals-sections.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Learn how to perform the following tasks using the Node.js driver in the
22
Fundamentals section:
33

44
- :doc:`Connect to MongoDB </fundamentals/connection>`
5-
- :doc:`Use the Versioned API </fundamentals/versioned-api>`
5+
- :doc:`Use the {+stable-api+} </fundamentals/stable-api>`
66
- :doc:`Authenticate with MongoDB </fundamentals/authentication>`
77
- :doc:`Read from and Write to MongoDB </fundamentals/crud>`
88
- :doc:`Access Return Values </fundamentals/promises>`
@@ -13,6 +13,6 @@ Fundamentals section:
1313
- :doc:`Log Events in the Driver </fundamentals/logging>`
1414
- :doc:`Monitor Driver Events </fundamentals/monitoring>`
1515
- :doc:`Store and Retrieve Large Files in MongoDB </fundamentals/gridfs>`
16-
- :doc:`Create and Query Time Series Collection</fundamentals/time-series>`
16+
- :doc:`Create and Query Time Series Collection </fundamentals/time-series>`
1717
- :doc:`Specify Type Parameters with TypeScript </fundamentals/typescript>`
1818

0 commit comments

Comments
 (0)