Fix relative url as basePath#10057
Conversation
|
Push |
|
Can you add some tests for it? |
|
@agilob sorry for the late response. just added a test as you requested |
| } | ||
| } | ||
|
|
||
| public static boolean isRelativeUrl(List<Server> servers) { |
| } | ||
|
|
||
| public static boolean isRelativeUrl(List<Server> servers) { | ||
| if (servers.size() > 0) { |
There was a problem hiding this comment.
can servers be null or empty?
| } | ||
|
|
||
| @Test | ||
| public void testHandlesRelativeUrlsInServers() { |
There was a problem hiding this comment.
method configureGeneratorProperties is package protected, you didn't need to write this whole test with setup of new yaml file
|
just a note: You didn't need to create new yaml to test |
ok so how would you write this test? i just adopted the test closest to my issue |
|
Are there any open tasks? |
modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java
Outdated
Show resolved
Hide resolved
Fix lines change tabs to spaces
|
are there any open tasks? |
|
issue #10056 |
|
@agilob can we merge that pr. i still have to patch this bug to use this generator |
|
cc @wing328 |
|
Let me try to review and merge this weekend. Sorry for the delay as there are too many PRs. |
|
When the server URL consists of a single slash, i.e. |
fixes #2731
fixes #8576
fixes #10697
fixes #10056
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.3.x,6.0.x