Adding usePythonSrcRootInImports logic to AbstractPythonConnexionServerCodegen#9559
Merged
spacether merged 1 commit intoOpenAPITools:masterfrom Jun 2, 2021
Merged
Conversation
e112d44 to
062d0fb
Compare
Contributor
Author
|
Oops! I didn't make the tests that check a "path" platform agnostic. I'm force pushing a consolidated commit with this fix to make this easier to merge. |
062d0fb to
97e0780
Compare
Contributor
Author
|
The tests failures seem to be unrelated to my change since they're occurring in the csharp suite and I never made any changes to the Petstore example. |
spacether
approved these changes
Jun 2, 2021
Contributor
spacether
left a comment
There was a problem hiding this comment.
This looks good; thank you for your PR!
6 tasks
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.
(#9558) This PR adds a new
usePythonSrcRootInImportsflag to allow a user of the generator to specify that they want thepythonSrcRootvalue included in the namespaces generated. The default value of false leaves the output as is today. I added this change into the AbstractPythonConnexionServerCodegen so all the extending generators can benefit from it.I've added a new unit test suite against the AbstractPythonConnexionServerCodegen since one didn't exist. In there I use a dataProvider to test that with the new flag off that there are no changes to what is generated now and that with the flag on the appropriate paths for file generation and import namespaces are changed.
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.For Windows users, please run the script in Git BASH.
master,5.1.x,6.0.xcc: @taxpon @frol @mbohlool @cbornet @kenjones-cisco @tomplus @Jyhess @arun-nalla @spacether