-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Issue 9926 #9930
Issue 9926 #9930
Conversation
This allows variable-name generation for nested structures without shadowing violations, like v${{itemsDepth}}.
…r-codegen into issue-9926
…r-codegen into issue-9926
Erm, how can I add a reviewer? Any chance of this getting merged? |
Hi @mitchnull, i can help with review, thanks a lot for PR btw! |
Hello, Thanks! Let me know what are the next steps to take with this. cheers, |
The PR looks good to me, i don't see this could affect current output code from generators, i just have one doubt, why |
TBH, I haven't found parentModel when I tried to solve my problem, I'll check it now... At a quick glance it seems to only work for polymorphic models. The parentContainer is set when the parent is just a plain List or Map, like with this model:
I believe parentModel doesn't help with the above case. Also, I still need the itemsDepth for the variable-declarations to avoid shadowing. |
got it, thanks again for PR! |
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.3.0.0
branch for changes related to OpenAPI spec 3.0. Default:master
.Description of the PR
implement issue #9926 ("parentContainer" property). Add "itemsDepth" property for proper nested variable name creation in templates (without shadowing violations).