Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alvaro Frias Garay <[email protected]>
  • Loading branch information
qequ committed May 9, 2024
1 parent 505fbda commit 4e65678
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
9 changes: 7 additions & 2 deletions integration_test/test_data/handler/restaurants.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func GetRestaurants() {
// @param isDigitalScreen query string false "Use as filter.isDigitalScreen! IsDigitalScreen. Can be: true, false"
// @success 200 {object} GetPogsResponse
// @failure 400 {object} ValidationError
// @failure 404 {object} types.ErrResponse
// @failure 500 {object} types.ErrResponse
// @failure 404 {object} ErrResponse
// @failure 500 {object} ErrResponse
// @route assortment/planogram [get]
func GetPogs() {}

Expand All @@ -41,3 +41,8 @@ type ValidationError struct {
StatusCode int `json:"statusCode" xml:"statusCode"`
Errors []error `json:"errors" xml:"errors"`
}

type ErrResponse struct {
StatusCode int `json:"statusCode" xml:"statusCode"`
Message string `json:"message" xml:"message"`
}
16 changes: 13 additions & 3 deletions integration_test/test_data/spec/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/"
"$ref": "#/components/schemas/ErrResponse"
}
}
}
Expand All @@ -203,7 +203,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/"
"$ref": "#/components/schemas/ErrResponse"
}
}
}
Expand Down Expand Up @@ -280,7 +280,6 @@
},
"components": {
"schemas": {
"": {},
"CreateUserRequest": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -332,6 +331,17 @@
}
}
},
"ErrResponse": {
"type": "object",
"properties": {
"statusCode": {
"type": "integer"
},
"message": {
"type": "string"
}
}
},
"Filter": {
"type": "object",
"properties": {
Expand Down
16 changes: 13 additions & 3 deletions integration_test/test_data/spec/expected_with_pkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/"
"$ref": "#/components/schemas/github.com.parvez3019.go-swagger3.handler.ErrResponse"
}
}
}
Expand All @@ -203,7 +203,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/"
"$ref": "#/components/schemas/github.com.parvez3019.go-swagger3.handler.ErrResponse"
}
}
}
Expand Down Expand Up @@ -280,7 +280,6 @@
},
"components": {
"schemas": {
"": {},
"Headers": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -361,6 +360,17 @@
}
}
},
"github.com.parvez3019.go-swagger3.handler.ErrResponse": {
"type": "object",
"properties": {
"statusCode": {
"type": "integer"
},
"message": {
"type": "string"
}
}
},
"github.com.parvez3019.go-swagger3.handler.GetPogsResponse": {
"type": "object",
"properties": {
Expand Down

0 comments on commit 4e65678

Please sign in to comment.