OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
The generated PACKAGENAME.configuration.Configuration() class has means of persisting options via its set_default() class method.
However, in order for the persisted options to be used on future instances, the Configuration.get_default_copy() class method must be used instead of the Configurator() constructor.
This isn't currently done in any of the generated models, so the programmer is unable to override self.local_vars_configuration.client_side_validation to help deal with non-conforming server responses.
Updating the Python templates to use the get_default_copy() class method solves this.
Description
The generated
PACKAGENAME.configuration.Configuration()
class has means of persisting options via itsset_default()
class method.However, in order for the persisted options to be used on future instances, the
Configuration.get_default_copy()
class method must be used instead of theConfigurator()
constructor. This isn't currently done in any of the generated models, so the programmer is unable to overrideself.local_vars_configuration.client_side_validation
to help deal with non-conforming server responses. Updating the Python templates to use theget_default_copy()
class method solves this.openapi-generator version
5.0.1-SNAPSHOT (commit 3d23b99242ad80f440d4ca3eb9f90103a4ec208b)
OpenAPI declaration file content or url
https://bitwarden.com/help/api/specs/public/swagger.json (relevant to why I'm working with openapi-generator, but unrelated to the issue itself)
Command line used for generation
Steps to reproduce
Generate the API Client with the existing templates
Related issues/PRs
N/A
Suggest a fix/enhancement
The Contributing Guidelines say to submit an issue before submitting a PR. It will be submitted shortly.