Skip to content

Commit c6f2aee

Browse files
committed
DOCSP-43495-schema-command
1 parent 7c50b20 commit c6f2aee

File tree

2 files changed

+113
-0
lines changed

2 files changed

+113
-0
lines changed

source/copilot-schema.txt

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
.. _vsce-copilot-schema:
2+
3+
==============
4+
/schema Command
5+
==============
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
14+
The ``/schema`` command provides information about your collection
15+
schema. The |copilot| accesses your connected MongoDB deployment to
16+
provide schema information in the Copilot generated response.
17+
18+
Examples
19+
--------
20+
21+
Provide a Sample Document
22+
~~~~~~~~~~~~~~~~~~~~~~~~~
23+
24+
Consider the ``users`` collection in the `Mflix Sample Database
25+
<https://www.mongodb.com/docs/atlas/sample-data/sample-mflix/#sample_mflix.users>`__.
26+
If you are connected to the MongoDB deployment that contains this
27+
collection, you can ask the |copilot| to provide a sample document.
28+
29+
.. code-block:: none
30+
:copyable: false
31+
32+
@MongoDB /schema Can you show a sample document from the
33+
sample_mflix.users collection?
34+
35+
The GitHub Copilot Chat uses the |copilot| to
36+
generate the following response using knowledge of your collection
37+
schema:
38+
39+
.. code-block:: none
40+
:copyable: false
41+
42+
Sure, here is a sample document from the sample_mflix.users
43+
collection:
44+
45+
{
46+
"_id": {
47+
"$oid": "5f8473b823bca94021aa1c45"
48+
},
49+
"email": "[email protected]",
50+
"name": "John Doe",
51+
"password": "password123",
52+
"preferences": {}
53+
}
54+
55+
Once Copilot generates the response, you can open the JSON output to see
56+
more information.
57+
58+
.. figure:: /images/copilot-schema.png
59+
:figwidth: 700px
60+
:alt: Screenshot of copilot providing a sample document from a
61+
collection.
62+
63+
64+
65+
66+

source/images/copilot-schema.png

Lines changed: 47 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)