Skip to content

Conversation

@wing328
Copy link
Member

@wing328 wing328 commented Feb 4, 2019

PR checklist

  • Read the contribution guidelines.
  • 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\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

  • Added "servers" support in path, operation
  • Tested locally to ensure the servers defined in operation override those defined in path

Dependency: #2048

cc @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01)

@wing328 wing328 added the WIP Work in Progress label Feb 4, 2019
@wing328 wing328 removed the WIP Work in Progress label Feb 5, 2019
@wing328
Copy link
Member Author

wing328 commented Feb 7, 2019

cc @OpenAPITools/generator-core-team as the change covers default codegen

@wing328 wing328 merged commit 36fa710 into master Feb 8, 2019
@wing328 wing328 deleted the python-path-servers branch February 8, 2019 03:48
A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
* add servers to path, operation

* add path/operation server support to python client

* update python samples

* fix index

* fix python code style
@spacether
Copy link
Contributor

spacether commented Feb 26, 2020

This PR had a typo in it in api.mustache line 89:

if int(kwags.get('_host_index')) < 0 or int(kawgs.get('_host_index')) >= len(local_var_hosts):

kwags does not exist, it should have been kwargs.
My PR: #5552
will fix it when it is merged
@wing328 any idea why our CI tests missed this?
Nearby lines also failed linting because they were too long.

@droidrcc
Copy link

droidrcc commented Jul 30, 2020

Hi @wing328,

Is this available for all the other languages? It looks like generated Java clients, doesn't handle overridden servers into paths.

Tested with openapi generator v. 4.3.1

@wing328
Copy link
Member Author

wing328 commented Jul 30, 2020

Can you try the latest master with the jersey2 library in the Java client generator?

@droidrcc
Copy link

droidrcc commented Sep 15, 2020

Can you try the latest master with the jersey2 library in the Java client generator?

Thanks @wing328.

Tested with openapi-generator-cli-5.0.0-beta2 and jersey2 library in a generated java clients and it worked. It doesn't seem to be the case with java and okhttp-gson library.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants