Skip to content

Commit

Permalink
Fix typo: OperationReponse -> OperationResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
Niko committed Nov 24, 2020
1 parent ffa3de6 commit 4d6d8e7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fizz.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func Deprecated(deprecated bool) func(*openapi.OperationInfo) {
// Response adds an additional response to the operation.
func Response(statusCode, desc string, model interface{}, headers []*openapi.ResponseHeader) func(*openapi.OperationInfo) {
return func(o *openapi.OperationInfo) {
o.Responses = append(o.Responses, &openapi.OperationReponse{
o.Responses = append(o.Responses, &openapi.OperationResponse{
Code: statusCode,
Description: desc,
Model: model,
Expand Down
6 changes: 3 additions & 3 deletions openapi/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ func TestAddOperation(t *testing.T) {
Summary: "ABC",
Description: "XYZ",
Deprecated: true,
Responses: []*OperationReponse{
&OperationReponse{
Responses: []*OperationResponse{
&OperationResponse{
Code: "400",
Description: "Bad Request",
Model: CustomError{},
},
&OperationReponse{
&OperationResponse{
Code: "5XX",
Description: "Server Errors",
},
Expand Down
6 changes: 3 additions & 3 deletions openapi/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type OperationInfo struct {
Description string
Deprecated bool
InputModel interface{}
Responses []*OperationReponse
Responses []*OperationResponse
}

// ResponseHeader represents a single header that
Expand All @@ -22,9 +22,9 @@ type ResponseHeader struct {
Model interface{}
}

// OperationReponse represents a single response of an
// OperationResponse represents a single response of an
// API operation.
type OperationReponse struct {
type OperationResponse struct {
// The response code can be "default"
// according to OAS3 spec.
Code string
Expand Down

0 comments on commit 4d6d8e7

Please sign in to comment.