-
Notifications
You must be signed in to change notification settings - Fork 35
DOCSP-43495-schema-command #97
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
Changes from 6 commits
c6f2aee
0eb20fc
00a2af8
22576d1
e5f4c3e
55dfc3e
a3df17f
7bd725e
a249a48
9fe4031
fe5504f
09bfa4c
b1c8955
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.. _vsce-copilot-schema: | ||
|
||
=============== | ||
/schema Command | ||
=============== | ||
|
||
.. default-domain:: mongodb | ||
|
||
.. contents:: On this page | ||
:local: | ||
:backlinks: none | ||
:depth: 1 | ||
|
||
The ``/schema`` command provides information about your collection | ||
schema. The |copilot| accesses your connected MongoDB deployment to | ||
provide schema information in the Copilot generated response. | ||
|
||
Examples | ||
-------- | ||
|
||
Provide a Sample Document | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
|
||
Consider the ``users`` collection in the `Mflix Sample Database | ||
|
||
<https://www.mongodb.com/docs/atlas/sample-data/sample-mflix/#sample_mflix.users>`__. | ||
If you are connected to a MongoDB deployment that contains this | ||
|
||
collection, you can ask the |copilot| to provide a sample document: | ||
|
||
.. code-block:: none | ||
:copyable: false | ||
|
||
@MongoDB /schema Can you show a sample document from the | ||
sample_mflix.users collection? | ||
|
||
GitHub Copilot uses the |copilot| to generate the following response: | ||
|
||
.. code-block:: none | ||
:copyable: false | ||
|
||
Sure, here is a sample document from the sample_mflix.users | ||
collection: | ||
|
||
{ | ||
|
||
"_id": { | ||
"$oid": "5f8473b823bca94021aa1c45" | ||
}, | ||
"email": "[email protected]", | ||
"name": "John Doe", | ||
"password": "password123", | ||
"preferences": {} | ||
} | ||
|
||
Once Copilot generates the response, you can open the JSON output to see | ||
|
||
more information. | ||
|
||
.. figure:: /images/copilot-schema.png | ||
:figwidth: 600px | ||
:alt: Screenshot of copilot providing a sample document from a collection. | ||
|
||
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider rewrite in form "To XXX, the YYY."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this section to simplify!