oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

Update echo params to be idiomatic

Open natehart opened this issue 2 years ago • 1 comments

Note To Reviewer: I'm aware that you don't usually want to change variable names in generated code, but this particular change should not affect existing code, as interfaces don't need to have the same parameter names as their implementations.

Change Description

Echo uses c as the echo.Context parameter name, differentiating it from the widely used ctx for a context.Context.

This commit updates the generated code to use the c echo.Context convention to bring it in line with Echo's common practice and make generated code more readable.

This change will not break existing code. Existing ServerInterface implementations do not need to have the same parameter names, so all existing code that has ctx echo.Context will be able to ignore the change (or update when it's convenient).

natehart avatar Dec 06 '23 19:12 natehart

Thanks very much @natehart, on the face of it this looks good, and I appreciate the focus you've put on making sure this isn't a user-breaking change! Would you mind addressing the conflicts?

jamietanna avatar Dec 13 '23 12:12 jamietanna