swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

Fix Issue 7924 - Allow host and base path to be changed independently

Open alango opened this issue 7 years ago • 11 comments

PR checklist

  • [x] Read the contribution guidelines.
  • [x] Ran the shell script under ./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\.
  • [x] Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • [x] Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

@bbdouglas @JFCote @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger

Description of the PR

Fixes #7924 Separate the hostname and the base path so that they can be changed independently of one another

alango avatar Apr 10 '18 08:04 alango

Tests seem to pass, so not sure what I've done to make the CI fail now... Is there anything else I need to do to move this forward? (not sure who to tag, @jeff9finger?)

alango avatar Apr 13 '18 15:04 alango

I like the concept. However, I think this would be more useful to provide more granularity here. Combining the schema, host and port into a property named "host" is a bit misleading. I'd like to see separate properties for schema, host, and port (or at least schema and host with the port combined with the host). An alternative would be to rename the property to something besides "host".

What does the community think?

jeff9finger avatar Apr 16 '18 17:04 jeff9finger

Was erring on the side of making small changes, but agree it would make sense to split out the scheme as well and am happy to do that 🙂. (Alternatively, if there's already some precedent for this in swagger-codegen, then I'm also happy to follow that.)

alango avatar Apr 17 '18 09:04 alango

Separated out the scheme, let me know if there's anything else you want from me.

alango avatar Apr 17 '18 14:04 alango

Also, this seems useful for all the java client libraries. Would you consider adding it to the other Java client libraries?

jeff9finger avatar Apr 18 '18 01:04 jeff9finger

My project happens to use this library so that's what I've been testing with. I'd rather not edit the other Java client libraries since there are at least some where it looks my change won't easily apply, and I don't want to touch more code that I don't have time to test right now!

alango avatar Apr 18 '18 08:04 alango

@alango I understand your time constraints. Thanks for the contribution.

@wing328 Can we put this request out to the community and see if someone else has time to add this to the other Java client libraries?

jeff9finger avatar Apr 18 '18 15:04 jeff9finger

@jeff9finger Do you know if this is going to be merged soon, or are you planning to wait for the other libraries to be updated?

alango avatar Apr 24 '18 10:04 alango

@wing328 Can we go ahead and get this merged?

jeff9finger avatar Apr 24 '18 17:04 jeff9finger

@wing328 bump?

alango avatar Jun 01 '18 14:06 alango

Any updates?

callmeberzerker avatar Nov 02 '18 21:11 callmeberzerker