From 664f2468f20fb9577bd50159e649c39f0048a8b0 Mon Sep 17 00:00:00 2001 From: Dmitriy Lukiyanchuk Date: Wed, 31 Aug 2022 13:39:56 +0300 Subject: [PATCH] Run make generate to pass github checks --- .../name-normalizer/name_normalizer.gen.go | 4 +- internal/test/parameters/parameters.gen.go | 44 ++++---- internal/test/parameters/parameters_test.go | 12 +- internal/test/schemas/schemas.gen.go | 24 ++-- internal/test/server/server_moq.gen.go | 104 ++++++++++-------- internal/test/strict-server/chi/server.gen.go | 8 +- internal/test/strict-server/chi/server.go | 4 +- .../test/strict-server/echo/server.gen.go | 8 +- internal/test/strict-server/echo/server.go | 4 +- internal/test/strict-server/gin/server.gen.go | 8 +- internal/test/strict-server/gin/server.go | 4 +- 11 files changed, 117 insertions(+), 107 deletions(-) diff --git a/internal/test/name-normalizer/name_normalizer.gen.go b/internal/test/name-normalizer/name_normalizer.gen.go index 20c598468..74b36a9ed 100644 --- a/internal/test/name-normalizer/name_normalizer.gen.go +++ b/internal/test/name-normalizer/name_normalizer.gen.go @@ -10,7 +10,7 @@ import ( "encoding/base64" "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "net/url" "path" @@ -233,7 +233,7 @@ func (c *ClientWithResponses) GetHTTPPetWithResponse(ctx context.Context, petID // ParseGetHTTPPetResponse parses an HTTP response from a GetHTTPPetWithResponse call func ParseGetHTTPPetResponse(rsp *http.Response) (*GetHTTPPetResponse, error) { - bodyBytes, err := ioutil.ReadAll(rsp.Body) + bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err diff --git a/internal/test/parameters/parameters.gen.go b/internal/test/parameters/parameters.gen.go index 9d0fc0e49..e75e9024f 100644 --- a/internal/test/parameters/parameters.gen.go +++ b/internal/test/parameters/parameters.gen.go @@ -63,8 +63,8 @@ type GetCookieParams struct { // Co complex object Co *ComplexObject `form:"co,omitempty" json:"co,omitempty"` - // N1s name starting with number - N1s *string `form:"1s,omitempty" json:"1s,omitempty"` + // N1S name starting with number + N1S *string `form:"1s,omitempty" json:"1s,omitempty"` } // EnumParamsParams defines parameters for EnumParams. @@ -135,8 +135,8 @@ type GetQueryFormParams struct { // Co complex object Co *ComplexObject `form:"co,omitempty" json:"co,omitempty"` - // N1s name starting with number - N1s *string `form:"1s,omitempty" json:"1s,omitempty"` + // N1S name starting with number + N1S *string `form:"1s,omitempty" json:"1s,omitempty"` } // RequestEditorFn is the function signature for the RequestEditor callback function @@ -273,7 +273,7 @@ type ClientInterface interface { GetSimplePrimitive(ctx context.Context, param int32, reqEditors ...RequestEditorFn) (*http.Response, error) // GetStartingWithNumber request - GetStartingWithNumber(ctx context.Context, n1param string, reqEditors ...RequestEditorFn) (*http.Response, error) + GetStartingWithNumber(ctx context.Context, n1Param string, reqEditors ...RequestEditorFn) (*http.Response, error) } func (c *Client) GetContentObject(ctx context.Context, param ComplexObject, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -516,8 +516,8 @@ func (c *Client) GetSimplePrimitive(ctx context.Context, param int32, reqEditors return c.Client.Do(req) } -func (c *Client) GetStartingWithNumber(ctx context.Context, n1param string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetStartingWithNumberRequest(c.Server, n1param) +func (c *Client) GetStartingWithNumber(ctx context.Context, n1Param string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetStartingWithNumberRequest(c.Server, n1Param) if err != nil { return nil, err } @@ -695,10 +695,10 @@ func NewGetCookieRequest(server string, params *GetCookieParams) (*http.Request, req.AddCookie(cookie6) } - if params.N1s != nil { + if params.N1S != nil { var cookieParam7 string - cookieParam7, err = runtime.StyleParamWithLocation("simple", true, "1s", runtime.ParamLocationCookie, *params.N1s) + cookieParam7, err = runtime.StyleParamWithLocation("simple", true, "1s", runtime.ParamLocationCookie, *params.N1S) if err != nil { return nil, err } @@ -1366,9 +1366,9 @@ func NewGetQueryFormRequest(server string, params *GetQueryFormParams) (*http.Re } - if params.N1s != nil { + if params.N1S != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "1s", runtime.ParamLocationQuery, *params.N1s); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "1s", runtime.ParamLocationQuery, *params.N1S); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1563,12 +1563,12 @@ func NewGetSimplePrimitiveRequest(server string, param int32) (*http.Request, er } // NewGetStartingWithNumberRequest generates requests for GetStartingWithNumber -func NewGetStartingWithNumberRequest(server string, n1param string) (*http.Request, error) { +func NewGetStartingWithNumberRequest(server string, n1Param string) (*http.Request, error) { var err error var pathParam0 string - pathParam0 = n1param + pathParam0 = n1Param serverURL, err := url.Parse(server) if err != nil { @@ -1697,7 +1697,7 @@ type ClientWithResponsesInterface interface { GetSimplePrimitiveWithResponse(ctx context.Context, param int32, reqEditors ...RequestEditorFn) (*GetSimplePrimitiveResponse, error) // GetStartingWithNumber request - GetStartingWithNumberWithResponse(ctx context.Context, n1param string, reqEditors ...RequestEditorFn) (*GetStartingWithNumberResponse, error) + GetStartingWithNumberWithResponse(ctx context.Context, n1Param string, reqEditors ...RequestEditorFn) (*GetStartingWithNumberResponse, error) } type GetContentObjectResponse struct { @@ -2322,8 +2322,8 @@ func (c *ClientWithResponses) GetSimplePrimitiveWithResponse(ctx context.Context } // GetStartingWithNumberWithResponse request returning *GetStartingWithNumberResponse -func (c *ClientWithResponses) GetStartingWithNumberWithResponse(ctx context.Context, n1param string, reqEditors ...RequestEditorFn) (*GetStartingWithNumberResponse, error) { - rsp, err := c.GetStartingWithNumber(ctx, n1param, reqEditors...) +func (c *ClientWithResponses) GetStartingWithNumberWithResponse(ctx context.Context, n1Param string, reqEditors ...RequestEditorFn) (*GetStartingWithNumberResponse, error) { + rsp, err := c.GetStartingWithNumber(ctx, n1Param, reqEditors...) if err != nil { return nil, err } @@ -2730,7 +2730,7 @@ type ServerInterface interface { GetSimplePrimitive(ctx echo.Context, param int32) error // (GET /startingWithNumber/{1param}) - GetStartingWithNumber(ctx echo.Context, n1param string) error + GetStartingWithNumber(ctx echo.Context, n1Param string) error } // ServerInterfaceWrapper converts echo contexts to parameters. @@ -2850,7 +2850,7 @@ func (w *ServerInterfaceWrapper) GetCookie(ctx echo.Context) error { if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter 1s: %s", err)) } - params.N1s = &value + params.N1S = &value } @@ -3240,7 +3240,7 @@ func (w *ServerInterfaceWrapper) GetQueryForm(ctx echo.Context) error { // ------------- Optional query parameter "1s" ------------- - err = runtime.BindQueryParameter("form", true, false, "1s", ctx.QueryParams(), ¶ms.N1s) + err = runtime.BindQueryParameter("form", true, false, "1s", ctx.QueryParams(), ¶ms.N1S) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter 1s: %s", err)) } @@ -3334,12 +3334,12 @@ func (w *ServerInterfaceWrapper) GetSimplePrimitive(ctx echo.Context) error { func (w *ServerInterfaceWrapper) GetStartingWithNumber(ctx echo.Context) error { var err error // ------------- Path parameter "1param" ------------- - var n1param string + var n1Param string - n1param = ctx.Param("1param") + n1Param = ctx.Param("1param") // Invoke the callback with all the unmarshalled arguments - err = w.Handler.GetStartingWithNumber(ctx, n1param) + err = w.Handler.GetStartingWithNumber(ctx, n1Param) return err } diff --git a/internal/test/parameters/parameters_test.go b/internal/test/parameters/parameters_test.go index b0fe6b15e..18836dd1a 100644 --- a/internal/test/parameters/parameters_test.go +++ b/internal/test/parameters/parameters_test.go @@ -170,8 +170,8 @@ func (t *testServer) GetQueryForm(ctx echo.Context, params GetQueryFormParams) e if params.Co != nil { t.complexObject = params.Co } - if params.N1s != nil { - t.n1param = params.N1s + if params.N1S != nil { + t.n1param = params.N1S } return nil } @@ -230,8 +230,8 @@ func (t *testServer) GetCookie(ctx echo.Context, params GetCookieParams) error { if params.Co != nil { t.complexObject = params.Co } - if params.N1s != nil { - t.n1param = params.N1s + if params.N1S != nil { + t.n1param = params.N1S } return nil } @@ -690,7 +690,7 @@ func TestClientQueryParams(t *testing.T) { P: &expectedPrimitive2, Ps: &expectedPrimitiveString, Co: &expectedComplexObject, - N1s: &expectedStartingWithNumber, + N1S: &expectedStartingWithNumber, } req, err := NewGetQueryFormRequest(server, &qParams) @@ -709,7 +709,7 @@ func TestClientQueryParams(t *testing.T) { Ep: &expectedPrimitive1, P: &expectedPrimitive2, Co: &expectedComplexObject, - N1s: &expectedStartingWithNumber, + N1S: &expectedStartingWithNumber, } req, err = NewGetCookieRequest(server, &cParams) assert.NoError(t, err) diff --git a/internal/test/schemas/schemas.gen.go b/internal/test/schemas/schemas.gen.go index b6a9f2086..053ee7b75 100644 --- a/internal/test/schemas/schemas.gen.go +++ b/internal/test/schemas/schemas.gen.go @@ -178,7 +178,7 @@ type ClientInterface interface { GetIssues375(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // Issue41 request - Issue41(ctx context.Context, n1param N5StartsWithNumber, reqEditors ...RequestEditorFn) (*http.Response, error) + Issue41(ctx context.Context, n1Param N5StartsWithNumber, reqEditors ...RequestEditorFn) (*http.Response, error) // Issue9 request with any body Issue9WithBody(ctx context.Context, params *Issue9Params, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -270,8 +270,8 @@ func (c *Client) GetIssues375(ctx context.Context, reqEditors ...RequestEditorFn return c.Client.Do(req) } -func (c *Client) Issue41(ctx context.Context, n1param N5StartsWithNumber, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewIssue41Request(c.Server, n1param) +func (c *Client) Issue41(ctx context.Context, n1Param N5StartsWithNumber, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIssue41Request(c.Server, n1Param) if err != nil { return nil, err } @@ -496,12 +496,12 @@ func NewGetIssues375Request(server string) (*http.Request, error) { } // NewIssue41Request generates requests for Issue41 -func NewIssue41Request(server string, n1param N5StartsWithNumber) (*http.Request, error) { +func NewIssue41Request(server string, n1Param N5StartsWithNumber) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "1param", runtime.ParamLocationPath, n1param) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "1param", runtime.ParamLocationPath, n1Param) if err != nil { return nil, err } @@ -649,7 +649,7 @@ type ClientWithResponsesInterface interface { GetIssues375WithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetIssues375Response, error) // Issue41 request - Issue41WithResponse(ctx context.Context, n1param N5StartsWithNumber, reqEditors ...RequestEditorFn) (*Issue41Response, error) + Issue41WithResponse(ctx context.Context, n1Param N5StartsWithNumber, reqEditors ...RequestEditorFn) (*Issue41Response, error) // Issue9 request with any body Issue9WithBodyWithResponse(ctx context.Context, params *Issue9Params, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*Issue9Response, error) @@ -902,8 +902,8 @@ func (c *ClientWithResponses) GetIssues375WithResponse(ctx context.Context, reqE } // Issue41WithResponse request returning *Issue41Response -func (c *ClientWithResponses) Issue41WithResponse(ctx context.Context, n1param N5StartsWithNumber, reqEditors ...RequestEditorFn) (*Issue41Response, error) { - rsp, err := c.Issue41(ctx, n1param, reqEditors...) +func (c *ClientWithResponses) Issue41WithResponse(ctx context.Context, n1Param N5StartsWithNumber, reqEditors ...RequestEditorFn) (*Issue41Response, error) { + rsp, err := c.Issue41(ctx, n1Param, reqEditors...) if err != nil { return nil, err } @@ -1142,7 +1142,7 @@ type ServerInterface interface { GetIssues375(ctx echo.Context) error // (GET /issues/41/{1param}) - Issue41(ctx echo.Context, n1param N5StartsWithNumber) error + Issue41(ctx echo.Context, n1Param N5StartsWithNumber) error // (GET /issues/9) Issue9(ctx echo.Context, params Issue9Params) error @@ -1237,9 +1237,9 @@ func (w *ServerInterfaceWrapper) GetIssues375(ctx echo.Context) error { func (w *ServerInterfaceWrapper) Issue41(ctx echo.Context) error { var err error // ------------- Path parameter "1param" ------------- - var n1param N5StartsWithNumber + var n1Param N5StartsWithNumber - err = runtime.BindStyledParameterWithLocation("simple", false, "1param", runtime.ParamLocationPath, ctx.Param("1param"), &n1param) + err = runtime.BindStyledParameterWithLocation("simple", false, "1param", runtime.ParamLocationPath, ctx.Param("1param"), &n1Param) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter 1param: %s", err)) } @@ -1247,7 +1247,7 @@ func (w *ServerInterfaceWrapper) Issue41(ctx echo.Context) error { ctx.Set(Access_tokenScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments - err = w.Handler.Issue41(ctx, n1param) + err = w.Handler.Issue41(ctx, n1Param) return err } diff --git a/internal/test/server/server_moq.gen.go b/internal/test/server/server_moq.gen.go index aa22e65ca..80bc73a9e 100644 --- a/internal/test/server/server_moq.gen.go +++ b/internal/test/server/server_moq.gen.go @@ -14,46 +14,46 @@ var _ ServerInterface = &ServerInterfaceMock{} // ServerInterfaceMock is a mock implementation of ServerInterface. // -// func TestSomethingThatUsesServerInterface(t *testing.T) { +// func TestSomethingThatUsesServerInterface(t *testing.T) { // -// // make and configure a mocked ServerInterface -// mockedServerInterface := &ServerInterfaceMock{ -// CreateResourceFunc: func(w http.ResponseWriter, r *http.Request, argument string) { -// panic("mock out the CreateResource method") -// }, -// CreateResource2Func: func(w http.ResponseWriter, r *http.Request, inlineArgument int, params CreateResource2Params) { -// panic("mock out the CreateResource2 method") -// }, -// GetEveryTypeOptionalFunc: func(w http.ResponseWriter, r *http.Request) { -// panic("mock out the GetEveryTypeOptional method") -// }, -// GetReservedKeywordFunc: func(w http.ResponseWriter, r *http.Request) { -// panic("mock out the GetReservedKeyword method") -// }, -// GetResponseWithReferenceFunc: func(w http.ResponseWriter, r *http.Request) { -// panic("mock out the GetResponseWithReference method") -// }, -// GetSimpleFunc: func(w http.ResponseWriter, r *http.Request) { -// panic("mock out the GetSimple method") -// }, -// GetWithArgsFunc: func(w http.ResponseWriter, r *http.Request, params GetWithArgsParams) { -// panic("mock out the GetWithArgs method") -// }, -// GetWithContentTypeFunc: func(w http.ResponseWriter, r *http.Request, contentType GetWithContentTypeParamsContentType) { -// panic("mock out the GetWithContentType method") -// }, -// GetWithReferencesFunc: func(w http.ResponseWriter, r *http.Request, globalArgument int64, argument string) { -// panic("mock out the GetWithReferences method") -// }, -// UpdateResource3Func: func(w http.ResponseWriter, r *http.Request, pFallthrough int) { -// panic("mock out the UpdateResource3 method") -// }, -// } +// // make and configure a mocked ServerInterface +// mockedServerInterface := &ServerInterfaceMock{ +// CreateResourceFunc: func(w http.ResponseWriter, r *http.Request, argument string) { +// panic("mock out the CreateResource method") +// }, +// CreateResource2Func: func(w http.ResponseWriter, r *http.Request, inlineArgument int, params CreateResource2Params) { +// panic("mock out the CreateResource2 method") +// }, +// GetEveryTypeOptionalFunc: func(w http.ResponseWriter, r *http.Request) { +// panic("mock out the GetEveryTypeOptional method") +// }, +// GetReservedKeywordFunc: func(w http.ResponseWriter, r *http.Request) { +// panic("mock out the GetReservedKeyword method") +// }, +// GetResponseWithReferenceFunc: func(w http.ResponseWriter, r *http.Request) { +// panic("mock out the GetResponseWithReference method") +// }, +// GetSimpleFunc: func(w http.ResponseWriter, r *http.Request) { +// panic("mock out the GetSimple method") +// }, +// GetWithArgsFunc: func(w http.ResponseWriter, r *http.Request, params GetWithArgsParams) { +// panic("mock out the GetWithArgs method") +// }, +// GetWithContentTypeFunc: func(w http.ResponseWriter, r *http.Request, contentType GetWithContentTypeParamsContentType) { +// panic("mock out the GetWithContentType method") +// }, +// GetWithReferencesFunc: func(w http.ResponseWriter, r *http.Request, globalArgument int64, argument string) { +// panic("mock out the GetWithReferences method") +// }, +// UpdateResource3Func: func(w http.ResponseWriter, r *http.Request, pFallthrough int) { +// panic("mock out the UpdateResource3 method") +// }, +// } // -// // use mockedServerInterface in code that requires ServerInterface -// // and then make assertions. +// // use mockedServerInterface in code that requires ServerInterface +// // and then make assertions. // -// } +// } type ServerInterfaceMock struct { // CreateResourceFunc mocks the CreateResource method. CreateResourceFunc func(w http.ResponseWriter, r *http.Request, argument string) @@ -208,7 +208,8 @@ func (mock *ServerInterfaceMock) CreateResource(w http.ResponseWriter, r *http.R // CreateResourceCalls gets all the calls that were made to CreateResource. // Check the length with: -// len(mockedServerInterface.CreateResourceCalls()) +// +// len(mockedServerInterface.CreateResourceCalls()) func (mock *ServerInterfaceMock) CreateResourceCalls() []struct { W http.ResponseWriter R *http.Request @@ -249,7 +250,8 @@ func (mock *ServerInterfaceMock) CreateResource2(w http.ResponseWriter, r *http. // CreateResource2Calls gets all the calls that were made to CreateResource2. // Check the length with: -// len(mockedServerInterface.CreateResource2Calls()) +// +// len(mockedServerInterface.CreateResource2Calls()) func (mock *ServerInterfaceMock) CreateResource2Calls() []struct { W http.ResponseWriter R *http.Request @@ -288,7 +290,8 @@ func (mock *ServerInterfaceMock) GetEveryTypeOptional(w http.ResponseWriter, r * // GetEveryTypeOptionalCalls gets all the calls that were made to GetEveryTypeOptional. // Check the length with: -// len(mockedServerInterface.GetEveryTypeOptionalCalls()) +// +// len(mockedServerInterface.GetEveryTypeOptionalCalls()) func (mock *ServerInterfaceMock) GetEveryTypeOptionalCalls() []struct { W http.ResponseWriter R *http.Request @@ -323,7 +326,8 @@ func (mock *ServerInterfaceMock) GetReservedKeyword(w http.ResponseWriter, r *ht // GetReservedKeywordCalls gets all the calls that were made to GetReservedKeyword. // Check the length with: -// len(mockedServerInterface.GetReservedKeywordCalls()) +// +// len(mockedServerInterface.GetReservedKeywordCalls()) func (mock *ServerInterfaceMock) GetReservedKeywordCalls() []struct { W http.ResponseWriter R *http.Request @@ -358,7 +362,8 @@ func (mock *ServerInterfaceMock) GetResponseWithReference(w http.ResponseWriter, // GetResponseWithReferenceCalls gets all the calls that were made to GetResponseWithReference. // Check the length with: -// len(mockedServerInterface.GetResponseWithReferenceCalls()) +// +// len(mockedServerInterface.GetResponseWithReferenceCalls()) func (mock *ServerInterfaceMock) GetResponseWithReferenceCalls() []struct { W http.ResponseWriter R *http.Request @@ -393,7 +398,8 @@ func (mock *ServerInterfaceMock) GetSimple(w http.ResponseWriter, r *http.Reques // GetSimpleCalls gets all the calls that were made to GetSimple. // Check the length with: -// len(mockedServerInterface.GetSimpleCalls()) +// +// len(mockedServerInterface.GetSimpleCalls()) func (mock *ServerInterfaceMock) GetSimpleCalls() []struct { W http.ResponseWriter R *http.Request @@ -430,7 +436,8 @@ func (mock *ServerInterfaceMock) GetWithArgs(w http.ResponseWriter, r *http.Requ // GetWithArgsCalls gets all the calls that were made to GetWithArgs. // Check the length with: -// len(mockedServerInterface.GetWithArgsCalls()) +// +// len(mockedServerInterface.GetWithArgsCalls()) func (mock *ServerInterfaceMock) GetWithArgsCalls() []struct { W http.ResponseWriter R *http.Request @@ -469,7 +476,8 @@ func (mock *ServerInterfaceMock) GetWithContentType(w http.ResponseWriter, r *ht // GetWithContentTypeCalls gets all the calls that were made to GetWithContentType. // Check the length with: -// len(mockedServerInterface.GetWithContentTypeCalls()) +// +// len(mockedServerInterface.GetWithContentTypeCalls()) func (mock *ServerInterfaceMock) GetWithContentTypeCalls() []struct { W http.ResponseWriter R *http.Request @@ -510,7 +518,8 @@ func (mock *ServerInterfaceMock) GetWithReferences(w http.ResponseWriter, r *htt // GetWithReferencesCalls gets all the calls that were made to GetWithReferences. // Check the length with: -// len(mockedServerInterface.GetWithReferencesCalls()) +// +// len(mockedServerInterface.GetWithReferencesCalls()) func (mock *ServerInterfaceMock) GetWithReferencesCalls() []struct { W http.ResponseWriter R *http.Request @@ -551,7 +560,8 @@ func (mock *ServerInterfaceMock) UpdateResource3(w http.ResponseWriter, r *http. // UpdateResource3Calls gets all the calls that were made to UpdateResource3. // Check the length with: -// len(mockedServerInterface.UpdateResource3Calls()) +// +// len(mockedServerInterface.UpdateResource3Calls()) func (mock *ServerInterfaceMock) UpdateResource3Calls() []struct { W http.ResponseWriter R *http.Request diff --git a/internal/test/strict-server/chi/server.gen.go b/internal/test/strict-server/chi/server.gen.go index 06dbc6ca8..ca61f2c2b 100644 --- a/internal/test/strict-server/chi/server.gen.go +++ b/internal/test/strict-server/chi/server.gen.go @@ -506,12 +506,12 @@ func (response MultipleRequestAndResponseTypes200FormdataResponse) VisitMultiple } } -type MultipleRequestAndResponseTypes200ImagepngResponse struct { +type MultipleRequestAndResponseTypes200ImagePngResponse struct { Body io.Reader ContentLength int64 } -func (response MultipleRequestAndResponseTypes200ImagepngResponse) VisitMultipleRequestAndResponseTypesResponse(w http.ResponseWriter) error { +func (response MultipleRequestAndResponseTypes200ImagePngResponse) VisitMultipleRequestAndResponseTypesResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "image/png") if response.ContentLength != 0 { w.Header().Set("Content-Length", fmt.Sprint(response.ContentLength)) @@ -630,12 +630,12 @@ type UnknownExampleResponseObject interface { VisitUnknownExampleResponse(w http.ResponseWriter) error } -type UnknownExample200Videomp4Response struct { +type UnknownExample200VideoMp4Response struct { Body io.Reader ContentLength int64 } -func (response UnknownExample200Videomp4Response) VisitUnknownExampleResponse(w http.ResponseWriter) error { +func (response UnknownExample200VideoMp4Response) VisitUnknownExampleResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "video/mp4") if response.ContentLength != 0 { w.Header().Set("Content-Length", fmt.Sprint(response.ContentLength)) diff --git a/internal/test/strict-server/chi/server.go b/internal/test/strict-server/chi/server.go index 748fc7d02..3b64606f0 100644 --- a/internal/test/strict-server/chi/server.go +++ b/internal/test/strict-server/chi/server.go @@ -43,7 +43,7 @@ func (s StrictServer) MultipartExample(ctx context.Context, request MultipartExa func (s StrictServer) MultipleRequestAndResponseTypes(ctx context.Context, request MultipleRequestAndResponseTypesRequestObject) (MultipleRequestAndResponseTypesResponseObject, error) { switch { case request.Body != nil: - return MultipleRequestAndResponseTypes200ImagepngResponse{Body: request.Body}, nil + return MultipleRequestAndResponseTypes200ImagePngResponse{Body: request.Body}, nil case request.JSONBody != nil: return MultipleRequestAndResponseTypes200JSONResponse(*request.JSONBody), nil case request.FormdataBody != nil: @@ -82,7 +82,7 @@ func (s StrictServer) TextExample(ctx context.Context, request TextExampleReques } func (s StrictServer) UnknownExample(ctx context.Context, request UnknownExampleRequestObject) (UnknownExampleResponseObject, error) { - return UnknownExample200Videomp4Response{Body: request.Body}, nil + return UnknownExample200VideoMp4Response{Body: request.Body}, nil } func (s StrictServer) UnspecifiedContentType(ctx context.Context, request UnspecifiedContentTypeRequestObject) (UnspecifiedContentTypeResponseObject, error) { diff --git a/internal/test/strict-server/echo/server.gen.go b/internal/test/strict-server/echo/server.gen.go index 3002b2ae0..30303fbd9 100644 --- a/internal/test/strict-server/echo/server.gen.go +++ b/internal/test/strict-server/echo/server.gen.go @@ -332,12 +332,12 @@ func (response MultipleRequestAndResponseTypes200FormdataResponse) VisitMultiple } } -type MultipleRequestAndResponseTypes200ImagepngResponse struct { +type MultipleRequestAndResponseTypes200ImagePngResponse struct { Body io.Reader ContentLength int64 } -func (response MultipleRequestAndResponseTypes200ImagepngResponse) VisitMultipleRequestAndResponseTypesResponse(w http.ResponseWriter) error { +func (response MultipleRequestAndResponseTypes200ImagePngResponse) VisitMultipleRequestAndResponseTypesResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "image/png") if response.ContentLength != 0 { w.Header().Set("Content-Length", fmt.Sprint(response.ContentLength)) @@ -456,12 +456,12 @@ type UnknownExampleResponseObject interface { VisitUnknownExampleResponse(w http.ResponseWriter) error } -type UnknownExample200Videomp4Response struct { +type UnknownExample200VideoMp4Response struct { Body io.Reader ContentLength int64 } -func (response UnknownExample200Videomp4Response) VisitUnknownExampleResponse(w http.ResponseWriter) error { +func (response UnknownExample200VideoMp4Response) VisitUnknownExampleResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "video/mp4") if response.ContentLength != 0 { w.Header().Set("Content-Length", fmt.Sprint(response.ContentLength)) diff --git a/internal/test/strict-server/echo/server.go b/internal/test/strict-server/echo/server.go index 748fc7d02..3b64606f0 100644 --- a/internal/test/strict-server/echo/server.go +++ b/internal/test/strict-server/echo/server.go @@ -43,7 +43,7 @@ func (s StrictServer) MultipartExample(ctx context.Context, request MultipartExa func (s StrictServer) MultipleRequestAndResponseTypes(ctx context.Context, request MultipleRequestAndResponseTypesRequestObject) (MultipleRequestAndResponseTypesResponseObject, error) { switch { case request.Body != nil: - return MultipleRequestAndResponseTypes200ImagepngResponse{Body: request.Body}, nil + return MultipleRequestAndResponseTypes200ImagePngResponse{Body: request.Body}, nil case request.JSONBody != nil: return MultipleRequestAndResponseTypes200JSONResponse(*request.JSONBody), nil case request.FormdataBody != nil: @@ -82,7 +82,7 @@ func (s StrictServer) TextExample(ctx context.Context, request TextExampleReques } func (s StrictServer) UnknownExample(ctx context.Context, request UnknownExampleRequestObject) (UnknownExampleResponseObject, error) { - return UnknownExample200Videomp4Response{Body: request.Body}, nil + return UnknownExample200VideoMp4Response{Body: request.Body}, nil } func (s StrictServer) UnspecifiedContentType(ctx context.Context, request UnspecifiedContentTypeRequestObject) (UnspecifiedContentTypeResponseObject, error) { diff --git a/internal/test/strict-server/gin/server.gen.go b/internal/test/strict-server/gin/server.gen.go index 5192a0dc5..f41d3b193 100644 --- a/internal/test/strict-server/gin/server.gen.go +++ b/internal/test/strict-server/gin/server.gen.go @@ -354,12 +354,12 @@ func (response MultipleRequestAndResponseTypes200FormdataResponse) VisitMultiple } } -type MultipleRequestAndResponseTypes200ImagepngResponse struct { +type MultipleRequestAndResponseTypes200ImagePngResponse struct { Body io.Reader ContentLength int64 } -func (response MultipleRequestAndResponseTypes200ImagepngResponse) VisitMultipleRequestAndResponseTypesResponse(w http.ResponseWriter) error { +func (response MultipleRequestAndResponseTypes200ImagePngResponse) VisitMultipleRequestAndResponseTypesResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "image/png") if response.ContentLength != 0 { w.Header().Set("Content-Length", fmt.Sprint(response.ContentLength)) @@ -478,12 +478,12 @@ type UnknownExampleResponseObject interface { VisitUnknownExampleResponse(w http.ResponseWriter) error } -type UnknownExample200Videomp4Response struct { +type UnknownExample200VideoMp4Response struct { Body io.Reader ContentLength int64 } -func (response UnknownExample200Videomp4Response) VisitUnknownExampleResponse(w http.ResponseWriter) error { +func (response UnknownExample200VideoMp4Response) VisitUnknownExampleResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "video/mp4") if response.ContentLength != 0 { w.Header().Set("Content-Length", fmt.Sprint(response.ContentLength)) diff --git a/internal/test/strict-server/gin/server.go b/internal/test/strict-server/gin/server.go index 748fc7d02..3b64606f0 100644 --- a/internal/test/strict-server/gin/server.go +++ b/internal/test/strict-server/gin/server.go @@ -43,7 +43,7 @@ func (s StrictServer) MultipartExample(ctx context.Context, request MultipartExa func (s StrictServer) MultipleRequestAndResponseTypes(ctx context.Context, request MultipleRequestAndResponseTypesRequestObject) (MultipleRequestAndResponseTypesResponseObject, error) { switch { case request.Body != nil: - return MultipleRequestAndResponseTypes200ImagepngResponse{Body: request.Body}, nil + return MultipleRequestAndResponseTypes200ImagePngResponse{Body: request.Body}, nil case request.JSONBody != nil: return MultipleRequestAndResponseTypes200JSONResponse(*request.JSONBody), nil case request.FormdataBody != nil: @@ -82,7 +82,7 @@ func (s StrictServer) TextExample(ctx context.Context, request TextExampleReques } func (s StrictServer) UnknownExample(ctx context.Context, request UnknownExampleRequestObject) (UnknownExampleResponseObject, error) { - return UnknownExample200Videomp4Response{Body: request.Body}, nil + return UnknownExample200VideoMp4Response{Body: request.Body}, nil } func (s StrictServer) UnspecifiedContentType(ctx context.Context, request UnspecifiedContentTypeRequestObject) (UnspecifiedContentTypeResponseObject, error) {