Add fallback for old configuration style
As a means to avoid the breaking changes we introduced in v1.11.0, where
the new-style configuration was made the default, we can tweak our
heuristic for how we work out what configuration is in use by only using
the new-style config if the new --config flag is used.
This change in itself is non-breaking, and makes it possible to continue
using the old configuration arguments, as long as you don't provide the
new --config flag.
Similar to thoughts in #629, but does not require a revert.
Closes #629.
So we will break people who updated :)
Let me do a couple of experiments first. I want to see whether we can correctly infer config file structure just by parsing the config.
Thanks Marcin, but no, no one gets broken 👏🏽
This allows people who are using the --old-config-style to simply remove that flag and work as before, folks who've not yet updated to the latest version will be able to continue using the old version, and folks who are using the new --config can continue.
There are a few places we use both styles of arguments, hence a bit more comfort in what I'm saying, and happy to hear how your own investigations go to see if there are any gaps!
Hey @deepmap-marcinr just thought I'd check in to see if you'd had a chance to do any further testing to see if this would be a good option for making the "old config" work?
What do you think of this? https://github.com/deepmap/oapi-codegen/pull/747