Skip to content

Commit 3256557

Browse files
authored
DOCSP-48687 - Standardize API source constants (#207)
1 parent 6aee8ae commit 3256557

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+604
-602
lines changed

snooty.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ mdb-server = "MongoDB server"
2727
kotlin-docs = "https://kotlinlang.org"
2828

2929
package-name-org = "mongodb-org"
30-
api = "https://mongodb.github.io/mongo-java-driver/{+version+}"
30+
api-root = "https://mongodb.github.io/mongo-java-driver/{+version+}/apidocs"
31+
core-api = "{+api-root+}/mongodb-driver-core/com/mongodb"
32+
driver-api = "{+api-root+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine"
3133
stable-api = "Stable API"
3234
mongocrypt-version = "{+full-version+}"
3335
nettyVersion = "io.netty:netty-all:4.1.79.Final"

source/api-documentation.txt

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ API Documentation
66
:titlesonly:
77
:maxdepth: 1
88

9-
BSON kotlinx.serialization <{+api+}/apidocs/bson-kotlinx/index.html>
10-
{+language+} Driver Extensions <{+api+}/apidocs/mongodb-driver-kotlin-extensions/index.html>
11-
Driver Core <{+api+}/apidocs/mongodb-driver-core/index.html>
12-
{+language+} Coroutine Driver <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/index.html>
13-
{+language+} Sync Driver <{+api+}/apidocs/mongodb-driver-kotlin-sync/index.html>
9+
BSON kotlinx.serialization <{+api-root+}/bson-kotlinx/index.html>
10+
{+language+} Driver Extensions <{+api-root+}/mongodb-driver-kotlin-extensions/index.html>
11+
Driver Core <{+api-root+}/mongodb-driver-core/index.html>
12+
{+language+} Coroutine Driver <{+api-root+}/mongodb-driver-kotlin-coroutine/index.html>
13+
{+language+} Sync Driver <{+api-root+}/mongodb-driver-kotlin-sync/index.html>
1414

15-
- `BSON kotlinx.serialization <{+api+}/apidocs/bson-kotlinx/index.html>`__ -
15+
- `BSON kotlinx.serialization <{+api-root+}/bson-kotlinx/index.html>`__ -
1616
classes for encoding and decoding between Kotlin data classes and the BSON data
1717
format using :github:`kotlinx.serialization <Kotlin/kotlinx.serialization>`.
1818
- `{+language+} Driver Extensions
19-
<{+api+}/apidocs/mongodb-driver-kotlin-extensions/index.html>`__ -
19+
<{+api-root+}/mongodb-driver-kotlin-extensions/index.html>`__ -
2020
classes that extend the core builder classes to support :ref:`data
2121
classes <kotlin-builders-data-classes>`.
22-
- `Driver Core <{+api+}/apidocs/mongodb-driver-core/index.html>`__ - classes that
22+
- `Driver Core <{+api-root+}/mongodb-driver-core/index.html>`__ - classes that
2323
contain essential driver functionality.
24-
- `{+language+} Coroutine Driver <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/index.html>`__ -
24+
- `{+language+} Coroutine Driver <{+api-root+}/mongodb-driver-kotlin-coroutine/index.html>`__ -
2525
classes for the current driver API using coroutines.
26-
- `{+language+} Sync Driver <{+api+}/apidocs/mongodb-driver-kotlin-sync/index.html>`__ -
26+
- `{+language+} Sync Driver <{+api-root+}/mongodb-driver-kotlin-sync/index.html>`__ -
2727
classes for the current synchronous driver API.

source/fundamentals/aggregation-expression-operations.txt

+139-139
Large diffs are not rendered by default.

source/fundamentals/aggregation.txt

+11-11
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Aggregation operations have some :manual:`limitations </core/aggregation-pipelin
5050

5151
- Pipeline stages have a memory limit of 100 megabytes by default. If required,
5252
you may exceed this limit by using the
53-
`allowDiskUse <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-aggregate-flow/allow-disk-use.html>`__
53+
`allowDiskUse <{+driver-api+}/-aggregate-flow/allow-disk-use.html>`__
5454
method.
5555

5656
.. important:: ``$graphLookup`` exception
@@ -98,7 +98,7 @@ To perform an aggregation, pass a list of aggregation stages to the
9898
``MongoCollection.aggregate()`` method.
9999

100100
The Kotlin driver provides the
101-
`Aggregates <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html>`__
101+
`Aggregates <{+core-api+}/client/model/Aggregates.html>`__
102102
helper class that contains builders for aggregation stages.
103103

104104
In the following example, the aggregation pipeline:
@@ -127,8 +127,8 @@ In the following example, the aggregation pipeline:
127127
For more information about the methods and classes mentioned in this section,
128128
see the following API Documentation:
129129

130-
- `MongoCollection.aggregate() <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/aggregate.html>`__
131-
- `Aggregates.match <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#match(org.bson.conversions.Bson)>`__
130+
- `MongoCollection.aggregate() <{+driver-api+}/-mongo-collection/aggregate.html>`__
131+
- `Aggregates.match <{+core-api+}/client/model/Aggregates.html#match(org.bson.conversions.Bson)>`__
132132

133133
Explain Aggregation
134134
-------------------
@@ -169,9 +169,9 @@ following resources:
169169

170170
- :manual:`Explain Output </reference/explain-results/>` Server Manual Entry
171171
- :manual:`Query Plans </core/query-plans/>` Server Manual Entry
172-
- `ExplainVerbosity <{+api+}/apidocs/mongodb-driver-core/com/mongodb/ExplainVerbosity>`__ API Documentation
173-
- `explain() <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-aggregate-flow/explain.html>`__ API Documentation
174-
- `AggregateFlow <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-aggregate-flow/index.html>`__ API Documentation
172+
- `ExplainVerbosity <{+core-api+}/ExplainVerbosity>`__ API Documentation
173+
- `explain() <{+driver-api+}/-aggregate-flow/explain.html>`__ API Documentation
174+
- `AggregateFlow <{+driver-api+}/-aggregate-flow/index.html>`__ API Documentation
175175

176176
Aggregation Expressions
177177
~~~~~~~~~~~~~~~~~~~~~~~
@@ -218,7 +218,7 @@ first element in the ``categories`` field.
218218
For more information about the methods and classes mentioned in this section,
219219
see the following API Documentation:
220220

221-
- `Accumulators <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html>`__
222-
- `$group <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#group(TExpression,java.util.List)>`__
223-
- `$project <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#project(org.bson.conversions.Bson)>`__
224-
- `Projections <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Projections.html>`__
221+
- `Accumulators <{+core-api+}/client/model/Accumulators.html>`__
222+
- `$group <{+core-api+}/client/model/Aggregates.html#group(TExpression,java.util.List)>`__
223+
- `$project <{+core-api+}/client/model/Aggregates.html#project(org.bson.conversions.Bson)>`__
224+
- `Projections <{+core-api+}/client/model/Projections.html>`__

source/fundamentals/auth.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ mechanism:
150150

151151
To specify the default authentication mechanism using the
152152
``MongoCredential`` class, use the
153-
`createScramSha256Credential() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createScramSha256Credential(java.lang.String,java.lang.String,char[])>`__
153+
`createScramSha256Credential() <{+core-api+}/MongoCredential.html#createScramSha256Credential(java.lang.String,java.lang.String,char[])>`__
154154
method. Your code to instantiate a ``MongoClient`` should resemble the following:
155155

156156
.. literalinclude:: /examples/generated/AuthTest.snippet.scram-sha-256-cred.kt
@@ -202,7 +202,7 @@ mechanism:
202202

203203
To specify the default authentication mechanism using the
204204
``MongoCredential`` class, use the
205-
`createScramSha1Credential() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createScramSha1Credential(java.lang.String,java.lang.String,char[])>`__
205+
`createScramSha1Credential() <{+core-api+}/MongoCredential.html#createScramSha1Credential(java.lang.String,java.lang.String,char[])>`__
206206
method. Your code to instantiate a ``MongoClient`` should resemble the following:
207207

208208
.. literalinclude:: /examples/generated/AuthTest.snippet.scram-sha-1-cred.kt
@@ -400,7 +400,7 @@ Specify Your Credentials in a MongoCredential
400400

401401
You can supply your AWS IAM credentials to a ``MongoClient`` by using a
402402
``MongoCredential`` instance. To construct the ``MongoCredential`` instance
403-
for ``MONGODB-AWS`` authentication, use the `createAwsCredential() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createAwsCredential(java.lang.String,char%5B%5D)>`__
403+
for ``MONGODB-AWS`` authentication, use the `createAwsCredential() <{+core-api+}/MongoCredential.html#createAwsCredential(java.lang.String,char%5B%5D)>`__
404404
factory method.
405405

406406
You can supply only programmatic access keys to the
@@ -424,7 +424,7 @@ in the following example:
424424
:emphasize-lines: 1, 9
425425

426426
If you need to specify an AWS session token, pass it to the
427-
`withMechanismProperty() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#withMechanismProperty(java.lang.String,T)>`__
427+
`withMechanismProperty() <{+core-api+}/MongoCredential.html#withMechanismProperty(java.lang.String,T)>`__
428428
method as shown in the following example:
429429

430430
.. literalinclude:: /examples/generated/AuthTest.snippet.aws-credential-session-token.kt
@@ -439,7 +439,7 @@ that returns new credentials as shown in the following example:
439439
:emphasize-lines: 4-6, 9
440440

441441
If you must provide AWS IAM credentials in a connection string, you can add
442-
it to your ``MongoClientSettings`` by calling the `applyConnectionString() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html#applyConnectionString(com.mongodb.ConnectionString)>`__
442+
it to your ``MongoClientSettings`` by calling the `applyConnectionString() <{+core-api+}/MongoClientSettings.Builder.html#applyConnectionString(com.mongodb.ConnectionString)>`__
443443
method:
444444

445445
.. literalinclude:: /examples/generated/AuthTest.snippet.aws-connection-string-session-token.kt
@@ -490,11 +490,11 @@ mechanism:
490490

491491
To specify the ``X.509`` authentication mechanism using the
492492
``MongoCredential`` class, use the
493-
`createMongoX509Credential() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createMongoX509Credential(java.lang.String)>`__
493+
`createMongoX509Credential() <{+core-api+}/MongoCredential.html#createMongoX509Credential(java.lang.String)>`__
494494
method. Also, enable TLS by calling the
495-
`applyToSslSettings() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html#applyToSslSettings(com.mongodb.Block)>`__
495+
`applyToSslSettings() <{+core-api+}/MongoClientSettings.Builder.html#applyToSslSettings(com.mongodb.Block)>`__
496496
method and setting the ``enabled`` property to ``true`` in the
497-
`SslSettings.Builder <{+api+}/apidocs/mongodb-driver-core/com/mongodb/connection/SslSettings.Builder.html>`__
497+
`SslSettings.Builder <{+core-api+}/connection/SslSettings.Builder.html>`__
498498
block. Your code to instantiate a ``MongoClient`` should resemble the following:
499499

500500
.. literalinclude:: /examples/generated/AuthTest.snippet.x-509-cred.kt

source/fundamentals/builders/aggregates.txt

+17-17
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Aggregates Builders
2424
Overview
2525
--------
2626

27-
In this guide, you can learn how to use the `Aggregates <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates>`__
27+
In this guide, you can learn how to use the `Aggregates <{+core-api+}/client/model/Aggregates>`__
2828
class which provides static factory methods that build :manual:`aggregation pipeline
2929
stages </meta/aggregation-quick-reference/#stages>` in the MongoDB Kotlin driver.
3030

@@ -237,7 +237,7 @@ for each distinct grouping.
237237

238238
.. tip::
239239

240-
The driver includes the `Accumulators <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html>`__
240+
The driver includes the `Accumulators <{+core-api+}/client/model/Accumulators.html>`__
241241
class with static factory methods for each of the supported accumulators.
242242

243243
The following example creates a pipeline stage that groups documents
@@ -304,7 +304,7 @@ the lowest three ``imdb.rating`` values for movies, grouped by ``year``:
304304
.. literalinclude:: /examples/generated/AggregatesBuilderTest.snippet.minN.kt
305305
:language: kotlin
306306

307-
See the `minN() API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html#minN(java.lang.String,InExpression,NExpression)>`__
307+
See the `minN() API documentation <{+core-api+}/client/model/Accumulators.html#minN(java.lang.String,InExpression,NExpression)>`__
308308
for more information.
309309

310310
.. _kotlin_aggregates_max_n:
@@ -321,7 +321,7 @@ return the highest two ``imdb.rating`` values for movies, grouped by ``year``:
321321
.. literalinclude:: /examples/generated/AggregatesBuilderTest.snippet.maxN.kt
322322
:language: kotlin
323323

324-
See the `maxN() API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html#maxN(java.lang.String,InExpression,NExpression)>`__
324+
See the `maxN() API documentation <{+core-api+}/client/model/Accumulators.html#maxN(java.lang.String,InExpression,NExpression)>`__
325325
for more information.
326326

327327
.. _kotlin_aggregates_first_n:
@@ -346,7 +346,7 @@ into the stage, grouped by ``year``:
346346
.. literalinclude:: /examples/generated/AggregatesBuilderTest.snippet.firstN.kt
347347
:language: kotlin
348348

349-
See the `firstN() API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html#firstN(java.lang.String,InExpression,NExpression)>`__
349+
See the `firstN() API documentation <{+core-api+}/client/model/Accumulators.html#firstN(java.lang.String,InExpression,NExpression)>`__
350350
for more information.
351351

352352
.. _kotlin_aggregates_last_n:
@@ -364,7 +364,7 @@ the stage, grouped by ``year``:
364364
.. literalinclude:: /examples/generated/AggregatesBuilderTest.snippet.lastN.kt
365365
:language: kotlin
366366

367-
See the `lastN() API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html#lastN(java.lang.String,InExpression,NExpression)>`__
367+
See the `lastN() API documentation <{+core-api+}/client/model/Accumulators.html#lastN(java.lang.String,InExpression,NExpression)>`__
368368
for more information.
369369

370370
.. _kotlin_aggregates_top:
@@ -382,7 +382,7 @@ the ``title`` and ``imdb.rating`` values for the top rated movies based on the
382382
.. literalinclude:: /examples/generated/AggregatesBuilderTest.snippet.top.kt
383383
:language: kotlin
384384

385-
See the `top() API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html#top(java.lang.String,org.bson.conversions.Bson,OutExpression)>`__
385+
See the `top() API documentation <{+core-api+}/client/model/Accumulators.html#top(java.lang.String,org.bson.conversions.Bson,OutExpression)>`__
386386
for more information.
387387

388388
.. _kotlin_aggregates_top_n:
@@ -407,7 +407,7 @@ the ``title`` and ``runtime`` values of the three longest movies based on the
407407
.. literalinclude:: /examples/generated/AggregatesBuilderTest.snippet.topN.kt
408408
:language: kotlin
409409

410-
See the `topN() API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html#topN(java.lang.String,org.bson.conversions.Bson,OutExpression,NExpression)>`__
410+
See the `topN() API documentation <{+core-api+}/client/model/Accumulators.html#topN(java.lang.String,org.bson.conversions.Bson,OutExpression,NExpression)>`__
411411
for more information.
412412

413413
.. _kotlin_aggregates_bottom:
@@ -425,7 +425,7 @@ return the ``title`` and ``runtime`` values of the shortest movie based on the
425425
.. literalinclude:: /examples/generated/AggregatesBuilderTest.snippet.bottom.kt
426426
:language: kotlin
427427

428-
See the `bottom() API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html#bottom(java.lang.String,org.bson.conversions.Bson,OutExpression)>`__
428+
See the `bottom() API documentation <{+core-api+}/client/model/Accumulators.html#bottom(java.lang.String,org.bson.conversions.Bson,OutExpression)>`__
429429
for more information.
430430

431431
.. _kotlin_aggregates_bottom_n:
@@ -449,7 +449,7 @@ based on the ``imdb.rating`` value, grouped by ``year``:
449449
.. literalinclude:: /examples/generated/AggregatesBuilderTest.snippet.bottomN.kt
450450
:language: kotlin
451451

452-
See the `bottomN() API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html#bottomN(java.lang.String,org.bson.conversions.Bson,OutExpression,NExpression)>`__
452+
See the `bottomN() API documentation <{+core-api+}/client/model/Accumulators.html#bottomN(java.lang.String,org.bson.conversions.Bson,OutExpression,NExpression)>`__
453453
for more information.
454454

455455
Unwind
@@ -663,7 +663,7 @@ into a bucket called "monster" for monstrously large screen sizes:
663663

664664
.. tip::
665665

666-
The driver includes the `Accumulators <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html>`__
666+
The driver includes the `Accumulators <{+core-api+}/client/model/Accumulators.html>`__
667667
class with static factory methods for each of the supported accumulators.
668668

669669
.. literalinclude:: /examples/generated/AggregatesBuilderTest.snippet.bucket-options.kt
@@ -698,7 +698,7 @@ in a new field called ``avgPrice``:
698698

699699
.. tip::
700700

701-
The driver includes the `Accumulators <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html>`__
701+
The driver includes the `Accumulators <{+core-api+}/client/model/Accumulators.html>`__
702702
class with static factory methods for each of the supported accumulators.
703703

704704
.. literalinclude:: /examples/generated/AggregatesBuilderTest.snippet.bucket-auto-options.kt
@@ -737,7 +737,7 @@ on a specified span of documents in a collection.
737737

738738
.. tip:: Window Functions
739739

740-
The driver includes the `Windows <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Windows.html>`__
740+
The driver includes the `Windows <{+core-api+}/client/model/Windows.html>`__
741741
class with static factory methods for building windowed computations.
742742

743743
The following example uses a fictional ``weather`` collection using data modeled
@@ -808,7 +808,7 @@ which contain ``ts`` values every 15 minutes between the existing documents:
808808
Document{{ position=Document{{coordinates=[-47.9, 47.6]}}, ts=Mon Mar 05 08:45:00 EST 1984 }}
809809
Document{{ _id=5553b..., position=Document{{type=Point, coordinates=[-47.9, 47.6]}}, ts=Mon Mar 05 09:00:00 EST 1984, ... }}
810810

811-
See the `densify package API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/densify/package-summary.html>`__
811+
See the `densify package API documentation <{+core-api+}/client/model/densify/package-summary.html>`__
812812
for more information.
813813

814814
Fill
@@ -861,7 +861,7 @@ these actions resembles the following:
861861
Weather(id=6308b..., hour=2, temperature=23.5C, air_pressure=29.75)
862862
Weather(id=6308b..., hour=3, temperature=23.6C, air_pressure=29.76)
863863

864-
See the `fill package API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/fill/package-summary.html>`__
864+
See the `fill package API documentation <{+core-api+}/client/model/fill/package-summary.html>`__
865865
for more information.
866866

867867
Atlas Full-Text Search
@@ -885,7 +885,7 @@ field in the ``movies`` collection for text that contains the word "Future":
885885
:language: kotlin
886886

887887
Learn more about the builders from the
888-
`search package API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/search/package-summary.html>`__.
888+
`search package API documentation <{+core-api+}/client/model/search/package-summary.html>`__.
889889

890890
Atlas Search Metadata
891891
---------------------
@@ -909,4 +909,4 @@ aggregation stage:
909909
:language: kotlin
910910

911911
Learn more about this helper from the
912-
`searchMeta() API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#searchMeta(com.mongodb.client.model.search.SearchCollector)>`__.
912+
`searchMeta() API documentation <{+core-api+}/client/model/Aggregates.html#searchMeta(com.mongodb.client.model.search.SearchCollector)>`__.

source/fundamentals/builders/builders-data-classes.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,4 @@ API Documentation
246246
-----------------
247247

248248
- `{+driver-short+} Extensions
249-
<{+api+}/apidocs/mongodb-driver-kotlin-extensions/index.html>`__
249+
<{+api-root+}/mongodb-driver-kotlin-extensions/index.html>`__

0 commit comments

Comments
 (0)