Skip to content

Update style guide to reflect path compression rules.#1475

Merged
dplore merged 9 commits intomasterfrom
robjs/style-guide-review-fixes
Apr 14, 2026
Merged

Update style guide to reflect path compression rules.#1475
dplore merged 9 commits intomasterfrom
robjs/style-guide-review-fixes

Conversation

@ElodinLaarz
Copy link
Copy Markdown
Contributor

Fork of #1424

robshakir and others added 6 commits January 9, 2026 17:47
 * (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
@ElodinLaarz
Copy link
Copy Markdown
Contributor Author

/gcbrun

@OpenConfigBot
Copy link
Copy Markdown

OpenConfigBot commented Apr 14, 2026

No major YANG version changes in commit a16d720

@OpenConfigBot
Copy link
Copy Markdown

No major YANG version changes in commit d600ff6

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread doc/openconfig_style_guide.md Outdated
Comment thread doc/openconfig_style_guide.md Outdated
- 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
@ElodinLaarz
Copy link
Copy Markdown
Contributor Author

/gcbrun

@ElodinLaarz ElodinLaarz assigned ElodinLaarz and dplore and unassigned ElodinLaarz Apr 14, 2026
@ElodinLaarz ElodinLaarz moved this to last-call in OC Operator Review Apr 14, 2026
@dplore dplore merged commit a584e04 into master Apr 14, 2026
15 checks passed
@dplore dplore deleted the robjs/style-guide-review-fixes branch April 14, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: last-call

Development

Successfully merging this pull request may close these issues.

4 participants