Remove `sortParamsByRequiredFlag` CLI option and force it to true
Add an operation with required and optional parameters in the spec.
Verify in test that parameters are always generated with required
first, optional after.
When sortParamsByRequiredFlag is set to false, parameters should be
generated in the same order as defined in the OpenAPI specification.
If an optional parameter appears before a required one, the generated
C++ method declaration may include a default argument followed by a
non-default parameter, which is not allowed in C++.
Example: (req1, opt1 = ..., req2)
This results in a compilation error:
"default argument missing for parameter"
Note that default values in the openapi spec do not affect the
generated C++ default arguments, they describe api behavior.
Therefore this option should always be enabled and should not
be configurable.
Emit a warning message when user attempts to set it to false.
Verify in test that in this case, the parameters are sorted.
Task-number: QTBUG-143713
Pick-to: 6.11
Change-Id: I66f1799ad31fb705848397cdbeaa4ea9393635ed
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>