Add tests for oneOf used directly in requestBody
Extend the basic-schema-alternatives OpenAPI spec with a new /farm-pets
POST endpoint whose requestBody uses oneOf inline (rather than a named
schema), which causes the generator to emit a synthetic model class
PostFarmPet_request.
Add two new test cases to tst_oneof.cpp:
- testPostFarmPetRequestJsonConversionMethods: verifies that the
generated PostFarmPet_request model correctly serialises/deserialises
each alternative (Bunny, Duck, Dog) and an empty object to/from JSON,
and that the isValid/isSet/isOneOfNValid/isOneOfNSet accessors reflect
the expected state.
- testPolymorphedRequestBody: calls actual generated API from client
side and check what is sent.
Task-number: QTBUG-144988
Change-Id: Ie708d1c81be530c68ba3860dc094f923460f3367
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>