From eb84d606cd7e1c7922304ee8745e5e3dea20f01b Mon Sep 17 00:00:00 2001 From: kfj Date: Sun, 30 Jun 2024 23:14:46 +0200 Subject: [PATCH] [Issue 1812] fix misalignment in expected.json and api.go messing with parser_test --- testdata/simple/api/api.go | 4 ++-- testdata/simple/expected.json | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/testdata/simple/api/api.go b/testdata/simple/api/api.go index 3bc6ec391..8c3205708 100644 --- a/testdata/simple/api/api.go +++ b/testdata/simple/api/api.go @@ -142,11 +142,11 @@ func GetPet6FunctionScopedResponse() { // @Success 200 {object} api.GetPet6FunctionScopedComplexResponse.response "ok" // @Router /GetPet6FunctionScopedComplexResponse [get] func GetPet6FunctionScopedComplexResponse() { - type child struct { + type pet struct { Name string } type response struct { - Child child + Pets []pet } } diff --git a/testdata/simple/expected.json b/testdata/simple/expected.json index e2a0dd71a..ad2adf27d 100644 --- a/testdata/simple/expected.json +++ b/testdata/simple/expected.json @@ -101,25 +101,25 @@ } } }, - "/GetPet6FunctionScopedResponse": { + "/GetPet6FunctionScopedComplexResponse": { "get": { "responses": { "200": { "description": "ok", "schema": { - "$ref": "#/definitions/api.GetPet6FunctionScopedResponse.response" + "$ref": "#/definitions/api.GetPet6FunctionScopedComplexResponse.response" } } } } }, - "/GetPet6FunctionScopedComplexResponse": { + "/GetPet6FunctionScopedResponse": { "get": { "responses": { "200": { "description": "ok", "schema": { - "$ref": "#/definitions/api.GetPet6FunctionScopedComplexResponse.response" + "$ref": "#/definitions/api.GetPet6FunctionScopedResponse.response" } } } @@ -416,7 +416,7 @@ "api.GetPet6FunctionScopedComplexResponse.pet": { "type": "object", "properties": { - "name": { + "Name": { "type": "string" } }