[Ruby] Fix Operation Servers#16144
Merged
wing328 merged 7 commits intoOpenAPITools:masterfrom Jul 25, 2023
Bandwidth-Sandbox:operation_servers
Merged
[Ruby] Fix Operation Servers#16144wing328 merged 7 commits intoOpenAPITools:masterfrom Bandwidth-Sandbox:operation_servers
wing328 merged 7 commits intoOpenAPITools:masterfrom
Bandwidth-Sandbox:operation_servers
Conversation
Contributor
Author
|
tests to come tomorrow |
Member
|
Tested locally and the result is good. Will file another PR to add some tests. |
This was referenced Jul 25, 2023
Member
|
Filed #16179 to add some tests. To test it locally, please include the following in the host table: |
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.
In relation to: #15162, #15610, #15611
This PR aims to fix the operation servers functionality. As of v6.6.0, if the user of the SDK does not define
server_operation_indexto map each operation to a server index, the default base url for the api will be used. This reverted the behavior prior to 6.6.0, which defaulted to using an operation specific server if one was defined, without needing to specify the index of the server to use. Prior to 6.6.0, the case constructing the base url usingscheme,host, andbase_pathwas unreachable unless the user specified to usenilas the index, as explained by @Confusion in #15162.This PR assumes the following:
server_indexor theserver_operation_indexhash, that index should be used and the proper variables have been defined for the url at that index.Based on these assumptions, the SDK will now:
server_operation_indexif one is defined for that operation, or defaulting toserver_index(or 0 ifserver_indexisnil) for which server to use.server_settingshash if no operation server is defined and the user has defined aserver_index.scheme,host, andbase_pathif there is no operation server defined and theserver_indexisnil(the new default value)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(6.3.0) (minor release - breaking changes with fallbacks),7.0.x(breaking changes without fallbacks)@cliffano (2017/07) @zlx (2017/09) @autopp (2019/02)