[Go] Fix deepObject serialization that are anyOf (#19090)

* [Go] Fix deepObject serialization that are anyOf

Updates the go client generator to have the generated struct for anyOf types conform to `MappedNullable` interface.
Fixes query params serialization for deepObjects that are of `anyOf` type.

Implements the suggestion in https://github.com/OpenAPITools/openapi-generator/issues/19085

* check parameter style for deepObject serialization

* generate samples for go-echo-external-refs-test

* move test back to http port

* restrict to anyof models with discriminator

* update test

* add some tests

added some tests to `modules/openapi-generator/src/test/resources/3_0/go/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml` and regenerated the samples
This commit is contained in:
Tanmay Mohapatra
2024-08-04 15:13:09 +05:30
committed by GitHub
parent e0f12e9bf4
commit 4c163fe4b0
45 changed files with 1500 additions and 233 deletions

View File

@@ -130,7 +130,7 @@ func TestFindPetsByTag(t *testing.T) {
func TestFindPetsByStatus(t *testing.T) {
resp, r, err := client.PetAPI.FindPetsByStatus(context.Background()).Status([]string{"available"}).Execute()
if err != nil {
t.Fatalf("Error while getting pet by id: %v", err)
t.Fatalf("Error while getting pet by status: %v", err)
t.Log(r)
} else {
if len(resp) == 0 {