Skip to content

Commit 3dc9124

Browse files
RUBY-2997 Allow loading schema map from file (#2539)
1 parent b0a26b1 commit 3dc9124

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

source/reference/client-side-encryption.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,22 @@ When you intend to use your schema map, convert it to a Ruby ``Hash`` using the
919919
:drivers:`Specify Encrypted Fields Using JSON Schema</security/client-side-field-level-encryption-guide/#c-specify-encrypted-fields-using-json-schema>`,
920920
:manual:`Automatic Encryption Rules</reference/security-client-side-automatic-json-schema/>`
921921

922+
``:schema_map_path``
923+
~~~~~~~~~~~~~~~~~~~~
924+
925+
It is also possible to load schema map from a file. Prepare the schema map as
926+
described above, save it to file, and then pass path to the file using
927+
``:schema_map_path`` option.
928+
929+
.. code-block:: ruby
930+
931+
Mongo::Client.new(['localhost:27017],
932+
auto_encryption_options: {
933+
schema_map_path: '/path/to/your/file.json',
934+
# ... (Fill in other options here)
935+
}
936+
)
937+
922938
``:bypass_auto_encryption``
923939
~~~~~~~~~~~~~~~~~~~~~~~~~~~
924940

0 commit comments

Comments
 (0)