When an object field has type string, it should accept strings only


- CommonLib::fromJsonValue(QString &value, const QJsonValue &jval)
should not convert non-string JSON values to strings.

OpenAPI 3.1 uses JSON Schema (2020-12) for validation.
JSON Schema specifies that a JSON value is a string only if it is
a sequence of Unicode characters enclosed in double quotation marks.
See “String Schemas” for an example:
https://cswr.github.io/JsonSchema/spec/basic_types/

Therefore, we should not silently convert other input data types
to string.

Also, from design perspective the OpenAPI defines a contract:
* The client sends data that matches the schema.
* The server relies on that structure.

Silent correction would mean:
* The client thinks it sent 42 (number).
* The server receives "42" (string).

This creates hidden behaviour that is not described in the API spec.

Task-number: QTBUG-145423
Pick-to: 6.11
Change-Id: I817af7e8a92ff137edef07563c5017b1f9f77380
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commit4e77ed98bc234df0dbddbc113a739ee24f15526a
parented8d2f5b5d9500d14fb3494714fa50c6498ba045
authorTatiana Borisova <tatiana.borisova@qt.io>
committerTatiana Borisova <tatiana.borisova@qt.io>
commit timeTue, 7 Apr 2026 15:57:44 +0200