Update style guide to reflect path compression rules.#1475
Merged
Conversation
* (M) doc/openconfig_style_guide.md
- Provide further documentation in the OpenConfig style guide
on the rules required to allow programmatic schema transformation.
These rules have been adhered to throughout the lifetime of
OpenConfig, and are implemented by widely used code generation
tools. This PR simply records these defacto style guide rules.
This PR is accompanied by openconfig/oc-pyang#59
which implements the relevant linter checks for the rules
described herein.
- Use RFC 2119 language (MUST/MUST NOT) for requirements - Clarify OpenConfig list key pattern exception wording - Improve readability of leaf/grandparent naming rule Addresses: PR #1424 threads on lines 498 and 503
Contributor
Author
|
/gcbrun |
|
No major YANG version changes in commit a16d720 |
|
No major YANG version changes in commit d600ff6 |
There was a problem hiding this comment.
Code Review
This pull request introduces a new 'Schema Usability' section to the OpenConfig style guide, establishing rules for node naming to support programmatic schema transformations such as path compression. The review feedback identifies an inconsistency in the phrasing of leaf node naming restrictions and a technical inaccuracy regarding the relationship between list keys and leafrefs, providing specific suggestions to improve clarity and correctness.
- Clarify leaf naming rule phrasing for consistency with list rule - Fix technical inaccuracy in OpenConfig list key pattern description - Improve intro paragraph wording for clarity Changes: - Updated leaf rule to use 'share its identifier with any of the children of its grandparent node' - Corrected key pattern description to clarify the node acting as key must be leafref - Simplified wording in schema transformation section
Contributor
Author
|
/gcbrun |
dplore
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fork of #1424