Azure / Azure/azure-cli

[Doc] `doc_source_map.json` is inaccurate

Open
#27,727 1 comment 0 reactions 1 assignee Assigned to @jsntcy View on GitHub
Auto-Assign Azure CLI Team potential-pruning question
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

In https://github.com/MicrosoftDocs/azure-docs-cli/blob/0836c43c2105ab63139fa5aa501ce11c45b287fe/latest/docs-ref-autogen/account/management-group/entities.yml#L17, the `editLink` of `az account management-group entities list` points to `profile` command module:

```yaml
editLink: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/profile/_help.py
```

but the help message actually comes from `resource` command module:

https://github.com/Azure/azure-cli/blob/e485117c0dadcc15aa909c4651d37edd19794020/src/azure-cli/azure/cli/command_modules/resource/_help.py#L241

`editLink` is generated from

https://github.com/Azure/azure-cli/blob/f73c7e9108e449c8c7c6c1c20f9dff26fce60125/doc/sphinx/azhelpgen/doc_source_map.json#L2

but the fact is that the relationship between command groups (`account` in this case) and command modules (`profile` in this case) is not an 1:1 or 1:N mapping, but an N:N mapping:

1. A command module can define multiple command groups
2. A command group can be defined by multiple command modules

Content in `doc_source_map.json` was first introduced by #712 and then moved to a separate file `doc/sphinx/azhelpgen/doc_source_map.json` in #822.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.