Skip to content

Conversation

@code1x1
Copy link
Contributor

@code1x1 code1x1 commented Jul 28, 2021

fixes #2731
fixes #8576
fixes #10697
fixes #10056

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    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.
  • File the PR against the correct branch: master, 5.3.x, 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@code1x1
Copy link
Contributor Author

code1x1 commented Aug 8, 2021

Push

@agilob
Copy link
Contributor

agilob commented Aug 14, 2021

Can you add some tests for it?

@code1x1
Copy link
Contributor Author

code1x1 commented Aug 22, 2021

@agilob sorry for the late response. just added a test as you requested

}
}

public static boolean isRelativeUrl(List<Server> servers) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace tabs with spaces

}

public static boolean isRelativeUrl(List<Server> servers) {
if (servers.size() > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can servers be null or empty?

}

@Test
public void testHandlesRelativeUrlsInServers() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method configureGeneratorProperties is package protected, you didn't need to write this whole test with setup of new yaml file

@agilob
Copy link
Contributor

agilob commented Aug 23, 2021

just a note: You didn't need to create new yaml to test configureGeneratorProperties. This method is package-private so can be tested directly.

@code1x1
Copy link
Contributor Author

code1x1 commented Aug 23, 2021

just a note: You didn't need to create new yaml to test configureGeneratorProperties. This method is package-private so can be tested directly.

ok so how would you write this test? i just adopted the test closest to my issue testHandlesTrailingSlashInServers and changed it to fit my needs 😅

Denis Behrends added 2 commits August 23, 2021 10:08
* replace tabs with spaces
* can `servers` be null or empty?
@code1x1
Copy link
Contributor Author

code1x1 commented Sep 8, 2021

Are there any open tasks?

code1x1 and others added 2 commits September 11, 2021 20:28
Fix lines change tabs to spaces
@code1x1
Copy link
Contributor Author

code1x1 commented Oct 15, 2021

can we close the pull request?
my last 2 commits (2e879c4, 05c6852) resolved the tabs issue

@code1x1
Copy link
Contributor Author

code1x1 commented Oct 25, 2021

are there any open tasks?

@code1x1
Copy link
Contributor Author

code1x1 commented Oct 27, 2021

issue #10056

@code1x1
Copy link
Contributor Author

code1x1 commented Oct 27, 2021

@agilob can we merge that pr. i still have to patch this bug to use this generator

@code1x1
Copy link
Contributor Author

code1x1 commented Oct 27, 2021

#2731

#8576

#10697

@macjohnny
Copy link
Member

cc @wing328

@macjohnny macjohnny requested a review from wing328 October 27, 2021 12:25
@wing328
Copy link
Member

wing328 commented Oct 27, 2021

Let me try to review and merge this weekend. Sorry for the delay as there are too many PRs.

@macjohnny macjohnny merged commit 0bb4f18 into OpenAPITools:master Nov 6, 2021
@wing328 wing328 added this to the 5.3.1 milestone Dec 18, 2021
@wing328 wing328 changed the title #10056 Fix relative url as basePath Fix relative url as basePath Dec 19, 2021
@surban
Copy link

surban commented May 8, 2023

When the server URL consists of a single slash, i.e. /, it is erroneously treated as absolute and replaced with http://localhost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

5 participants