Skip to content

DOCSP-59346 Connection Option Template#158

Merged
lindseymoore merged 7 commits into10gen:mainfrom
lindseymoore:DOCSP-59346
Apr 22, 2026
Merged

DOCSP-59346 Connection Option Template#158
lindseymoore merged 7 commits into10gen:mainfrom
lindseymoore:DOCSP-59346

Conversation

@lindseymoore
Copy link
Copy Markdown
Collaborator

@lindseymoore lindseymoore commented Apr 20, 2026

Jira: https://jira.mongodb.org/browse/DOCSP-59346

Creates a template for new Connection Options page format and option descriptions for page.

Option descriptions and template are adapted from the current C Driver Connection Options page.

Copy link
Copy Markdown
Collaborator

@stephmarie17 stephmarie17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, Lindsey! This will make the connection options revamp so much easier. Left some comments and a few questions, mostly around whether all the :manual: links should be updated to use :ref:, and some usage suggestions.

If you specify this option, the driver doesn't accept the
SRV connection format. You must use the standard connection URI format
instead. To learn more about the SRV connection
and the standard connection formats, see the :manual:`Connection Strings </reference/connection-string/>`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[q] Are we still planning to move :manual: links to :ref:?

Suggested change
and the standard connection formats, see the :manual:`Connection Strings </reference/connection-string/>`
and the standard connection formats, see the :ref:`Connection Strings <mongodb-uri>`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, applies to all.

Copy link
Copy Markdown
Collaborator Author

@lindseymoore lindseymoore Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, replaced all :manuals: links!

Comment thread dbx/connection-options/journal.rst Outdated
Comment thread dbx/connection-options/readPreference.rst Outdated
Comment thread dbx/connection-options-template.txt Outdated
@@ -0,0 +1,1305 @@
.. _c-connection-options:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[s] Maybe rename this so it's clearer it's meant to be changed and doesn't accidentally get carried over to another driver:

Suggested change
.. _c-connection-options:
.. _template-connection-options:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! Replaced all instances of 'c' in refs to 'template'

Comment thread dbx/connection-options-template.txt Outdated
How to Specify Connection Options
---------------------------------

.. TODO: Replace these sections with whatever methods for specify the connection option.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. TODO: Replace these sections with whatever methods for specify the connection option.
.. TODO: Replace these sections with whatever methods the driver you are documenting supports for specifying the connection option.

Comment thread dbx/connection-options-template.txt Outdated
Comment on lines +114 to +116
*Data Type* :

*Default Value* :
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[q] Are these required? Just wondering as the existing C driver page doesn't have this part so curious how it looks when rendered and if they are required to have a value specific to each driver?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started on C; here's what it will look like rendered: https://deploy-preview-19608--mongodb-c-driver.netlify.app/docs/languages/c/c-driver/upcoming/connect/connection-options/#replica-set-options

Please let me know what you think of how it looks!

We will have to hunt down the data type and defaults values for each of these options. Some drivers already have this info, some don't.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha that makes sense! I think that preview looks good maybe use bold instead of italics, similar to how we format the text in the tables? What do you think?

Comment on lines +750 to +759
You can set the read concern level by using the ``MONGOC_URI_READCONCERNLEVEL`` option:

.. literalinclude::
:language:
:copyable: true
:dedent:
:start-after:
:end-before:

You can also set the read concern level by using a ``mongoc_read_concern_t`` structure:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[q] Is this also driver-specific and should it include a TODO to call it out?

Comment on lines +844 to +853
You can set the read preference by using a ``mongoc_read_prefs_t`` structure:

.. literalinclude::
:language:
:copyable: true
:dedent:
:start-after:
:end-before:

You can also set the read preference by using the ``MONGOC_URI_READPREFERENCE`` option:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question 😅

:start-after:
:end-before:

You can also set the max staleness by using a ``mongoc_read_prefs_t`` structure:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here also?

Comment thread dbx/connection-options-template.txt Outdated
@@ -0,0 +1,1305 @@
.. _c-connection-options:

.. NOTE: Meant to be copied and used as a template for the connection options page.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[s] Suggestion to explain the usage of this doc more:

Suggested change
.. NOTE: Meant to be copied and used as a template for the connection options page.
.. NOTE: You can use this template for the connection options page in a drivers documentation set. Copy this content into the corresponding page for the driver you are documenting, and replace and edit content as needed. This is not meant to be used as a shared include.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case writers think they can include this and then use replace or something for whatever their specific content is.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

Copy link
Copy Markdown
Collaborator

@stephmarie17 stephmarie17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Left a suggestion in one comment.

Comment thread dbx/connection-options-template.txt Outdated
Comment on lines +114 to +116
*Data Type* :

*Default Value* :
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha that makes sense! I think that preview looks good maybe use bold instead of italics, similar to how we format the text in the tables? What do you think?

@lindseymoore lindseymoore merged commit 71e95bc into 10gen:main Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants