Repository navigation
Conversation
Contributor
|
Hello @ryanmco - we completely removed postprocessing so I'm closing this PR. |
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.
Resolve error forbidden keys ['custom_amount', 'selected_option_id'] on 'Tip' -> NO GENERATED CLASS FOUND
Description
fix: map anyOf/oneOf forbidden-key rules to union variant classes
find_forbidden_keys()previously walkedanyOfandoneOfbranches with theenclosing
current_class_name, treating unions identically toallOf. Forschemas like
tip.json—where aoneOfunion defines per-branchnotconstraints—
datamodel-code-generatoremits the parent (Tip) as aTypeAliasTypeunion and emits each branch as a separateBaseModelclass(
Tip1,Tip2,Tip3). Attributing all branches toTipboth mergedconflicting branch rules together and failed in
_patch_forbidden_keys()withNO GENERATED CLASS FOUNDbecauseclass Tipdoes not exist.Split
anyOf/oneOfhandling fromallOfso each union branch resolves to itsgenerated variant class under
--use-title-as-name:title(e.g."Tip"inherited from
tip.json), map to{current_class_name}{idx}(Tip1,Tip2,Tip3) since the parent union alias already claimsTip. Passingis_def=Truepreventswalk()from resetting{current_class_name}{idx}back to the inherited parent
title.titleof their own map to_alias_name(title)tomatch
--use-title-as-name.Category (Required)
Please select one or more categories that apply to this change.
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Related Issues
Checklist
!for breaking changes).transitionannotation rather than changing field visibility or removing a field directly.Screenshots / Logs (if applicable)