Skip to content

Update gin example to use most recent release changes - #554

Merged
1 commit merged into
oapi-codegen:masterfrom
jazware:update_gin_example
May 4, 2022
Merged

Update gin example to use most recent release changes#554
1 commit merged into
oapi-codegen:masterfrom
jazware:update_gin_example

Conversation

@jazware

@jazware jazware commented Apr 19, 2022

Copy link
Copy Markdown
Contributor

The most recent release of oapi-codegen (v1.10.0) included changes
that broke the existing examples which were introduced in #530

This change updates the gin example by regenerating the code-generated files and
updating the router registration to work with the new generated code.

It's worth considering whether we should update the gin template to return a concrete
type instead of the IRouter interface.

When the IRouter interface was introduced it seemed to exist just to allow mocking of the
interface (gin-gonic/gin#1607) so I think it may be reasonable to just return
a gin.RouterGroup from the RegisterHandlersWithOptions and RegisterHandlers generated functions.

The most recent release of `oapi-codegen` (v1.10.0) included changes
that broke the existing examples which were introduced in oapi-codegen#530

This change updates the `gin` example by regening the code-generated files and
updating the router registration to work with the new generated code.
@ghost
ghost merged commit 09c1d86 into oapi-codegen:master May 4, 2022
@jazware

jazware commented May 4, 2022

Copy link
Copy Markdown
Contributor Author

This example was in response to #530 which has since been rolled back, I don't think this should have been merged unless we decide to re-roll out the changes in #530 with a version bump that makes sense since they are breaking. Without the changes in #530 this example is invalid.

@ghost

ghost commented May 4, 2022 via email

Copy link
Copy Markdown

ghost pushed a commit that referenced this pull request May 4, 2022
This reverts commit 09c1d86. I merged
it after rolling back a change that it was dependent on.

#554 (comment)
adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
The most recent release of `oapi-codegen` (v1.10.0) included changes
that broke the existing examples which were introduced in oapi-codegen#530

This change updates the `gin` example by regening the code-generated files and
updating the router registration to work with the new generated code.
adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
…odegen#554)"

This reverts commit d9f6567. I merged
it after rolling back a change that it was dependent on.

oapi-codegen#554 (comment)
adrianpk added a commit to foorester/oapi-codegen that referenced this pull request May 31, 2024
The most recent release of `oapi-codegen` (v1.10.0) included changes
that broke the existing examples which were introduced in oapi-codegen#530

This change updates the `gin` example by regening the code-generated files and
updating the router registration to work with the new generated code.
adrianpk added a commit to foorester/oapi-codegen that referenced this pull request May 31, 2024
…odegen#554)"

This reverts commit 09c1d86. I merged
it after rolling back a change that it was dependent on.

oapi-codegen#554 (comment)
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant