Skip to content

Commit d826ef8

Browse files
author
Chris Cho
authored
DOCSP-27843: API documentation link reformat (#154)
* DOCSP-27843: API documentation link reformat
1 parent e707976 commit d826ef8

File tree

5 files changed

+22
-17
lines changed

5 files changed

+22
-17
lines changed

snooty.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ artifact-id-2-13 = "mongo-spark-connector_2.13"
1313
artifact-id-2-12 = "mongo-spark-connector_2.12"
1414
spark-core-version = "3.3.1"
1515
spark-sql-version = "3.3.1"
16-
scala-previous = "2.12"
17-
scala-previous-full = "2.12.13"
18-
scala-latest = "2.13"
19-
scala-latest-full = "2.13.10"
2016

2117
[substitutions]
2218
copy = "unicode:: U+000A9"

source/api-docs.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
=================
2+
API Documentation
3+
=================
4+
5+
.. toctree::
6+
:titlesonly:
7+
8+
Spark Connector for Scala 2.13 <https://www.javadoc.io/doc/org.mongodb.spark/{+artifact-id-2-13+}/{+current-version+}/index.html>
9+
Spark Connector for Scala 2.12 <https://www.javadoc.io/doc/org.mongodb.spark/{+artifact-id-2-12+}/{+current-version+}/index.html>

source/index.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ versions of Apache Spark and MongoDB:
5454
structured-streaming
5555
faq
5656
release-notes
57-
API Docs <https://www.javadoc.io/doc/org.mongodb.spark/mongo-spark-connector/latest/index.html>
57+
api-docs

source/java/api.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,40 @@ Dependency Management
55

66
.. include:: /includes/scala-java-dependencies.rst
77

8-
Beginning in version 3.2.0, Apache Spark supports both Scala {+scala-previous+} and {+scala-latest+}.
9-
Spark 3.1.3 and previous versions support only Scala {+scala-previous+}.
8+
Beginning in version 3.2.0, Apache Spark supports both Scala 2.12 and 2.13.
9+
Spark 3.1.3 and previous versions support only Scala 2.12.
1010
To provide support for both Scala versions, version {+current-version+} of the Spark
1111
Connector produces two artifacts:
1212

13-
- ``org.mongodb.spark:mongo-spark-connector_{+scala-previous+}:{+current-version+}`` is
14-
compiled against Scala {+scala-previous+}, and supports Spark 3.1.x and above.
15-
- ``org.mongodb.spark:mongo-spark-connector_{+scala-latest+}:{+current-version+}`` is
16-
compiled against Scala {+scala-latest+}, and supports Spark 3.2.x and above.
13+
- ``org.mongodb.spark:{+artifact-id-2-12+}:{+current-version+}`` is
14+
compiled against Scala 2.12, and supports Spark 3.1.x and above.
15+
- ``org.mongodb.spark:{+artifact-id-2-13+}:{+current-version+}`` is
16+
compiled against Scala 2.13, and supports Spark 3.2.x and above.
1717

1818
.. important::
1919

2020
Use the Spark Connector artifact that's compatible with your
2121
versions of Scala and Spark.
2222

2323
The following excerpt from a Maven ``pom.xml`` file shows how to include dependencies
24-
compatible with Scala {+scala-previous+}:
24+
compatible with Scala 2.12:
2525

2626
.. code-block:: xml
2727

2828
<dependencies>
2929
<dependency>
3030
<groupId>org.mongodb.spark</groupId>
31-
<artifactId>mongo-spark-connector_{+scala-previous+}</artifactId>
31+
<artifactId>{+artifact-id-2-12+}</artifactId>
3232
<version>{+current-version+}</version>
3333
</dependency>
3434
<dependency>
3535
<groupId>org.apache.spark</groupId>
36-
<artifactId>spark-core_{+scala-previous+}</artifactId>
36+
<artifactId>spark-core_2.12</artifactId>
3737
<version>{+spark-core-version+}</version>
3838
</dependency>
3939
<dependency>
4040
<groupId>org.apache.spark</groupId>
41-
<artifactId>spark-sql_{+scala-previous+}</artifactId>
41+
<artifactId>spark-sql_2.12</artifactId>
4242
<version>{+spark-sql-version+}</version>
4343
</dependency>
4444
</dependencies>

source/scala/api.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ a `SBT <http://www.scala-sbt.org/documentation.html>`_ ``build.scala`` file:
4040

4141
.. code-block:: scala
4242

43-
scalaVersion := "{+scala-previous+}",
43+
scalaVersion := "2.12",
4444
libraryDependencies ++= Seq(
45-
"org.mongodb.spark" %% "mongo-spark-connector" % "{+current-version+}",
45+
"org.mongodb.spark" %% "{+artifact-id-2-12+}" % "{+current-version+}",
4646
"org.apache.spark" %% "spark-core" % "{+spark-core-version+}",
4747
"org.apache.spark" %% "spark-sql" % "{+spark-sql-version+}"
4848
)

0 commit comments

Comments
 (0)