OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
20.51k stars 6.27k forks source link

[Python] Add Flag to Allow Ignoring Operation Servers #18981

Closed ckoegel closed 3 days ago

ckoegel commented 1 week ago

Similar to #18934.

This change adds a flag to the configuration object to allow for ignoring operation servers. Currently, if operation level server objects are defined, there is no way to ignore these or use a different base path at the SDK level, which many other languages support. The new ignore_operation_servers flag allows the user to ignore any operation servers defined and instead use the currently defined host. This will default to the top level base path defined in the OpenAPI file, but can be configured to be any url by setting the host for the configuration object.

PR checklist

@cbornet (2017/09) @tomplus (2018/10) @krjakbrjak (2023/02) @fa0311 (2023/10) @multani (2023/10)

wing328 commented 3 days ago

thanks for the PR, which looks good.

if no further feedback, I'll merge it tomorrow