-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[fix] Assign template directory to additional properties #3385
Conversation
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
Bug was introduced in #2946, which was introduced into the 4.1.x branch, so this bug only affects the master SNAPSHOT. I'm removing the bug label since this shouldn't require release notes. |
AppVeyor (Windows) found the following error:
|
CircleCI reports the following errors:
|
@wing328 I can fix the Windows path. I'm not sure why this works in some other tests... Maybe we're just not asserting on the path and it's getting normalized elsewhere. I don't understand the second error, as I've not done anything with |
I misunderstood the We may want to consider having some other "base configuration" tests in which no user options are set on the generator, at least for a single non-custom generator. |
@wing328 all checks have passed, merging into master now to unblock custom templates in 4.1.0-SNAPSHOT. I'll address anything else that arises in a separate 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
,./bin/openapi3/{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\
. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.master
,4.1.x
,5.0.x
. Default:master
.Description of the PR
As part of settings refactor, I had missed assigning the value of templateDir to additional properties. This result in 4.1.0-SNAPSHOT branch with borked custom template support.
This PR makes that asignment, and fixes some other potential issues with internal state in CodegenConfigurator (
set*
methods).Added a unit test which evaluates additional properties exist on a CodegenConfig instance after calling
processOpts()
. The test is limited to those properties known to be processed by DefaultCodegen.cc @OpenAPITools/generator-core-team
fixes #3364