Add setting of input.m_headers into the request


- Use all headers from `input.m_headers`, not only ContentType.
We have to use `request.setRawHeader()` in a loop, because the
request might already contain other headers that we want to keep,
and the `request.setHeaders()` call will simply overwrite them.

- Delete from the HttpRequest.cpp.mustache the if() condition,
that now never happens, since we set input.m_headers.
Note: The Openapi generator fails all *.yaml files without a media type,
e.g:
requestBody:
  content: {}

- Move setting of ContentType header for {{bodyParams}} block upper
inside the api-body.mustache, because even if the operation doesn't add
empty optional parameters into the resulting message, the operation's
message still should have a ContentType.

- Add tests for ContentType header into the operation-parameters
and mediatypes.

NOTE: ContentType header should always be set for POST operations.
Even operation parameters, that don't use requestBody, need to have
a ContentType header, NOT because Openapi SPEC requires it,
but because Qt Network libs require it.
See qt5/qtbase/src/network/access/qhttpnetworkrequest.cpp
QHttpNetworkRequestPrivate::header() for details.

- Revert alignments to the default ones in
the operation-parameters/server/api_test_.go

Change-Id: I9a5efe44dc01435bc15fa860d0b592d77f54d6dc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commit87cb0e3aa88c964d6f32989b211539acb333747c
parentf0b24ac6b6bb804c00374ba7197d42215858ab76
authorTatiana Borisova <tatiana.borisova@qt.io>
committerTatiana Borisova <tatiana.borisova@qt.io>
commit timeWed, 10 Sep 2025 05:55:20 +0000