Skip to content

DOCSP-48687 - Standardize API source constants #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion snooty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ mdb-server = "MongoDB server"
kotlin-docs = "https://kotlinlang.org"

package-name-org = "mongodb-org"
api = "https://mongodb.github.io/mongo-java-driver/{+version+}"
api-root = "https://mongodb.github.io/mongo-java-driver/{+version+}/apidocs"
core-api = "{+api-root+}/mongodb-driver-core/com/mongodb"
driver-api = "{+api-root+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine"
stable-api = "Stable API"
mongocrypt-version = "{+full-version+}"
nettyVersion = "io.netty:netty-all:4.1.79.Final"
Expand Down
20 changes: 10 additions & 10 deletions source/api-documentation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ API Documentation
:titlesonly:
:maxdepth: 1

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

- `BSON kotlinx.serialization <{+api+}/apidocs/bson-kotlinx/index.html>`__ -
- `BSON kotlinx.serialization <{+api-root+}/bson-kotlinx/index.html>`__ -
classes for encoding and decoding between Kotlin data classes and the BSON data
format using :github:`kotlinx.serialization <Kotlin/kotlinx.serialization>`.
- `{+language+} Driver Extensions
<{+api+}/apidocs/mongodb-driver-kotlin-extensions/index.html>`__ -
<{+api-root+}/mongodb-driver-kotlin-extensions/index.html>`__ -
classes that extend the core builder classes to support :ref:`data
classes <kotlin-builders-data-classes>`.
- `Driver Core <{+api+}/apidocs/mongodb-driver-core/index.html>`__ - classes that
- `Driver Core <{+api-root+}/mongodb-driver-core/index.html>`__ - classes that
contain essential driver functionality.
- `{+language+} Coroutine Driver <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/index.html>`__ -
- `{+language+} Coroutine Driver <{+api-root+}/mongodb-driver-kotlin-coroutine/index.html>`__ -
classes for the current driver API using coroutines.
- `{+language+} Sync Driver <{+api+}/apidocs/mongodb-driver-kotlin-sync/index.html>`__ -
- `{+language+} Sync Driver <{+api-root+}/mongodb-driver-kotlin-sync/index.html>`__ -
classes for the current synchronous driver API.
278 changes: 139 additions & 139 deletions source/fundamentals/aggregation-expression-operations.txt

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions source/fundamentals/aggregation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Aggregation operations have some :manual:`limitations </core/aggregation-pipelin

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

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

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

In the following example, the aggregation pipeline:
Expand Down Expand Up @@ -127,8 +127,8 @@ In the following example, the aggregation pipeline:
For more information about the methods and classes mentioned in this section,
see the following API Documentation:

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

Explain Aggregation
-------------------
Expand Down Expand Up @@ -169,9 +169,9 @@ following resources:

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

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

- `Accumulators <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html>`__
- `$group <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#group(TExpression,java.util.List)>`__
- `$project <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#project(org.bson.conversions.Bson)>`__
- `Projections <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Projections.html>`__
- `Accumulators <{+core-api+}/client/model/Accumulators.html>`__
- `$group <{+core-api+}/client/model/Aggregates.html#group(TExpression,java.util.List)>`__
- `$project <{+core-api+}/client/model/Aggregates.html#project(org.bson.conversions.Bson)>`__
- `Projections <{+core-api+}/client/model/Projections.html>`__
16 changes: 8 additions & 8 deletions source/fundamentals/auth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ mechanism:

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

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

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

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

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

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

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

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

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

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

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

.. literalinclude:: /examples/generated/AuthTest.snippet.x-509-cred.kt
Expand Down
34 changes: 17 additions & 17 deletions source/fundamentals/builders/aggregates.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Aggregates Builders
Overview
--------

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

Expand Down Expand Up @@ -237,7 +237,7 @@ for each distinct grouping.

.. tip::

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

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

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

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

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

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

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

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

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

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

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)>`__
See the `top() API documentation <{+core-api+}/client/model/Accumulators.html#top(java.lang.String,org.bson.conversions.Bson,OutExpression)>`__
for more information.

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

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)>`__
See the `topN() API documentation <{+core-api+}/client/model/Accumulators.html#topN(java.lang.String,org.bson.conversions.Bson,OutExpression,NExpression)>`__
for more information.

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

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)>`__
See the `bottom() API documentation <{+core-api+}/client/model/Accumulators.html#bottom(java.lang.String,org.bson.conversions.Bson,OutExpression)>`__
for more information.

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

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)>`__
See the `bottomN() API documentation <{+core-api+}/client/model/Accumulators.html#bottomN(java.lang.String,org.bson.conversions.Bson,OutExpression,NExpression)>`__
for more information.

Unwind
Expand Down Expand Up @@ -663,7 +663,7 @@ into a bucket called "monster" for monstrously large screen sizes:

.. tip::

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

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

.. tip::

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

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

.. tip:: Window Functions

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

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

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

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

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

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

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

Atlas Search Metadata
---------------------
Expand All @@ -909,4 +909,4 @@ aggregation stage:
:language: kotlin

Learn more about this helper from the
`searchMeta() API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#searchMeta(com.mongodb.client.model.search.SearchCollector)>`__.
`searchMeta() API documentation <{+core-api+}/client/model/Aggregates.html#searchMeta(com.mongodb.client.model.search.SearchCollector)>`__.
2 changes: 1 addition & 1 deletion source/fundamentals/builders/builders-data-classes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,4 @@ API Documentation
-----------------

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