Azure / azure-cli

Azure Command-Line Interface
MIT License
3.95k stars 2.93k forks source link

MongoDB IDX sample doesn't parse at CLI #18809

Open sjwaight opened 3 years ago

sjwaight commented 3 years ago

The sample given for defining an index at the CLI is this document section:

Indexes, you can enter it as a string or as a file, e.g., --idx @indexes-file.json or --idx "[{"key": {"keys": ["_ts"]},"options": {"expireAfterSeconds": 1000}}, {"key": {"keys": ["user_id", "user_address"]}, "options": {"unique": "true"}}]".

doesn't parse at the CLI and the double quotes should be replaced with single quotes:

--idx '[{"key": {"keys": ["_ts"]},"options": {"expireAfterSeconds": 1000}}, {"key": {"keys": ["user_id", "user_address"]}, "options": {"unique": "true"}}]'.

There are also a few other doc pages that use the same example that require an update


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Wmengmsft, @MehaKaushik, @shurd, @anfeldma-ms.

Issue Details
The sample given for defining an index at the CLI is this document section: Indexes, you can enter it as a string or as a file, e.g., --idx @indexes-file.json or --idx "[{"key": {"keys": ["_ts"]},"options": {"expireAfterSeconds": 1000}}, {"key": {"keys": ["user_id", "user_address"]}, "options": {"unique": "true"}}]". doesn't parse at the CLI and the double quotes should be replaced with single quotes: --idx '[{"key": {"keys": ["_ts"]},"options": {"expireAfterSeconds": 1000}}, {"key": {"keys": ["user_id", "user_address"]}, "options": {"unique": "true"}}]'. There are also a few other doc pages that use the same example that require an update --- #### Document Details ⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.* * ID: a5323936-60e0-75a1-9f91-ea908249897d * Version Independent ID: e3c52896-95e5-1fea-fc8a-ab7170e95333 * Content: [az cosmosdb mongodb collection](https://docs.microsoft.com/en-us/cli/azure/cosmosdb/mongodb/collection?view=azure-cli-latest#az-cosmosdb-mongodb-collection-update) * Content Source: [latest/docs-ref-autogen/cosmosdb/mongodb/collection.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/latest/docs-ref-autogen/cosmosdb/mongodb/collection.yml) * Service: **cosmos-db** * GitHub Login: @rloutlaw * Microsoft Alias: **routlaw**
Author: sjwaight
Assignees: -
Labels: `Cosmos`, `Service Attention`
Milestone: -
yonzhan commented 3 years ago

route to service team

AverageDesigner commented 3 years ago

Assigning to MongoDb team @jasontho-ms

AverageDesigner commented 3 years ago

I have tried the same example on cli and it works with double-quotes. Here is a screenshot for reference.

image

sjwaight commented 3 years ago

The command will fail on a Linux command line, which includes the Azure Cloudshell Bash CLI.

AverageDesigner commented 3 years ago

This doc is being auto-generated. Reaching out to the respective team to find the process of auto generation.

wmengmsft commented 2 years ago

We are still working on fixing this issue and will share an update once the fix is ready.

rnagpal commented 2 years ago

@sjwaight : I hope you are not blocked on this since you already mentioned the workaround. We will get the doc update for this as soon as we can. It's currently backlogged.

sjwaight commented 2 years ago

Not blocked, but will be great to see this updated to open up to more people!