feat: support reference overrides for label, separator, visible, encryption in v2#272
Merged
lcastillo-ledger merged 1 commit intomainfrom Mar 16, 2026
Merged
Conversation
fsamier
approved these changes
Mar 16, 2026
src/erc7730/convert/resolved/v2/convert_erc7730_input_to_resolved.py
Outdated
Show resolved
Hide resolved
c613776 to
e4211b1
Compare
…yption in v2 Align the v2 linter with schema changes that allow $ref references in display.formats.XXX.fields to override label, separator, visible, and encryption keys from the referenced definition. - Add label, separator, visible, encryption optional fields to InputReference - Use first_not_none() override semantics (reference wins, falls back to definition) - Allow label to be None when visibility is "never" or "mustBe" (field not displayed) - Add 6 test cases covering each override and the label-optional scenarios Made-with: Cursor
e4211b1 to
74573ed
Compare
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.
Summary
label,separator,visible, andencryptionoverride fields toInputReferencein the v2 model, aligning the linter with v2 schema changes that allow$refreferences to override these keys from the referenced definition.first_not_none()semantics: reference value wins if set, otherwise falls back to the definition value (same pattern as v1labeloverride).labelto beNonewhenvisibleis"never"or{ mustBe: [...] }, since hidden fields don't need a display label.Test plan
definition_override_label,definition_override_separator,definition_override_visible,definition_override_encryption)definition_no_label_visible_never,definition_no_label_visible_must_be)Made with Cursor