Skip to content

Commit

Permalink
[Issue 1812] fix misalignment in expected.json and api.go messing wit…
Browse files Browse the repository at this point in the history
…h parser_test (#1836)
  • Loading branch information
KristofferFJ committed Jul 1, 2024
1 parent f32d4d3 commit 807dd1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions testdata/simple/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
10 changes: 5 additions & 5 deletions testdata/simple/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down Expand Up @@ -416,7 +416,7 @@
"api.GetPet6FunctionScopedComplexResponse.pet": {
"type": "object",
"properties": {
"name": {
"Name": {
"type": "string"
}
}
Expand Down

0 comments on commit 807dd1f

Please sign in to comment.