Skip to content
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

Update Configuration doc to use double underscores instead of colons for hierarchical config keys (4968) #5876

Merged
merged 15 commits into from
Apr 5, 2018

Conversation

isaacrlevin
Copy link
Contributor

@isaacrlevin isaacrlevin commented Apr 4, 2018

Based on conversation in #4968, changing language for hierarchigal config keys

@scottaddie @rachelappel

Internal Review Page

@@ -108,8 +108,7 @@ Configuration considerations:
* `IOptionsSnapshot` can reload configuration data when it changes. For more information, see [IOptionsSnapshot](xref:fundamentals/configuration/options#reload-configuration-data-with-ioptionssnapshot).,
* Configuration keys are **not** case-sensitive.
* **Never** store passwords or other sensitive data in configuration provider code or in plain text configuration files. Don't use production secrets in development or test environments. Specify secrets outside of the project so that they can't be accidentally committed to a source code repository. Learn more about [how to work with multiple environments](xref:fundamentals/environments) and managing [safe storage of app secrets in development](xref:security/app-secrets).
* If a colon (`:`) can't be used in environment variables on a system, replace the colon (`:`) with a double-underscore (`__`).

* A colon (`:`) may also be used for hierarchigal config keys, but may not work on all platforms. Double underscore (__) is supported by all platforms.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • may also --> may
  • hierarchigal --> hierarchical

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@scottaddie scottaddie requested a review from danroth27 April 4, 2018 19:24
@@ -43,7 +43,7 @@ The app reads and displays the following configuration settings:

[!code-json[](index/sample/ConfigJson/appsettings.json)]

Configuration consists of a hierarchical list of name-value pairs in which the nodes are separated by a colon. To retrieve a value, access the `Configuration` indexer with the corresponding item's key:
Configuration consists of a hierarchical list of name-value pairs in which the nodes are separated by a double underscore (`__`). To retrieve a value, access the `Configuration` indexer with the corresponding item's key:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite right. The double underscore syntax only applies to config values specified in env vars. When interacting with the config api you should use colons.

@@ -108,8 +108,7 @@ Configuration considerations:
* `IOptionsSnapshot` can reload configuration data when it changes. For more information, see [IOptionsSnapshot](xref:fundamentals/configuration/options#reload-configuration-data-with-ioptionssnapshot).,
* Configuration keys are **not** case-sensitive.
* **Never** store passwords or other sensitive data in configuration provider code or in plain text configuration files. Don't use production secrets in development or test environments. Specify secrets outside of the project so that they can't be accidentally committed to a source code repository. Learn more about [how to work with multiple environments](xref:fundamentals/environments) and managing [safe storage of app secrets in development](xref:security/app-secrets).
* If a colon (`:`) can't be used in environment variables on a system, replace the colon (`:`) with a double-underscore (`__`).

* A colon (`:`) may be used for hierarchical config keys, but may not work on all platforms. Double underscore (__) is supported by all platforms.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only true for specifying config values in env vars.

Copy link
Member

@danroth27 danroth27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to clarify that double underscores are only used to specify config value using env vars.

@isaacrlevin
Copy link
Contributor Author

@danroth27 how does that look?

@danroth27
Copy link
Member

It doesn't look like my first comment in the JSON config section was addressed.

@isaacrlevin
Copy link
Contributor Author

@danroth27, look better?

Copy link
Member

@danroth27 danroth27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@scottaddie scottaddie merged commit f8f7cc2 into dotnet:master Apr 5, 2018
@scottaddie
Copy link
Member

@isaac2004 Thank you for all of your work on this PR!

scottaddie added a commit that referenced this pull request Apr 6, 2018
* Update azure-apps-preview-notice.md (#5857)

* Link to .NET Core CLI publish command doc (#5864)

* Link to .NET Core CLI publish command doc

* Verbiage tweak

* fix typo (#5866)

* Update intro.md (#5869)

`classnameID` (where `classname` is the name of the class, such as `Student`) as the primary key. In `classnameID`, `classname` is the name of the class, such as `Student` in

* Update view-components.md (#5872)

altering range of code displayed to remove hanging closing } and closing table tag

* C13511:  Spaces should be replaced to avoid localization problems (#5871)

Hello, @Rick-Anderson, 

Localization team has reported source content issue that causes localized version to have broken format compared to en-us version.  

Please, help to check my proposed file change into the article and help to merge if you agree with fix. If not, please, let me know either if you would like me to fix it in another way within this PR, if you prefer to fix it in another PR or if I should close this PR as by-design. In case of using another PR, please, let me know of your PR number, so we can confirm and close this PR. 

Many thanks in advance.

* CI Update (#5878)

* Recommended language change (#5883)

* Updated with NET Core SDK 2.0  commands (#5886)

* Updated with NET Core SDK 2.0  commands

* Quick UE pass

* Prevent javascript injection. (#5885)

* Troubleshoot SDK warnings (#5880)

* WIP Troubleshoot SDK warnings

* Work

* work

* Address Gauntlet warning in ms.date value

* Adjust H2 title casing and spacing

* Quick UE pass

* Update Configuration doc to use double underscores instead of colons for hierarchical config keys (4968) (#5876)

* changes to configuration doc

* fixes for scott

* change for Dan

* Update index.md

* Code fence double underscore and add missing period

* Eliminate unnecessary sentence

* Missing npm task runner extension (#5893)

* Revert "Missing npm task runner extension (#5893)" (#5894)

This reverts commit a90faeb.

* Note about task runner explorer option (#5895)

* Note about task runner explorer option

The gulp file has to be in the root directory or in the directory with package.json not in any subdirectory.

* verbiage tweaks

* added anchored link (#5896)
@isaacrlevin isaacrlevin deleted the 4968-work branch April 24, 2018 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants