Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update module github.com/deepmap/oapi-codegen to v2 #78

Closed
wants to merge 2 commits into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 1, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
github.com/deepmap/oapi-codegen require major v1.16.2 -> v2.0.0

Warning

Some dependencies could not be looked up. Check the warning logs for more information.


Release Notes

deepmap/oapi-codegen (github.com/deepmap/oapi-codegen)

v2.0.0: : Remove deprecated packages

Compare Source

As announced in oapi-codegen v2 is coming, this is a release to perform some cleanup, drastically reducing the dependency graph for users of the library, and migrating to multi-repo middleware and utility packages that can evolve separately to the code generator itself.

There's more details in https://www.jvt.me/posts/2023/10/23/oapi-codegen-v2-decrease/ in the exact benefits ??, but the key metrics you will be interested in seeing are:

Before (v1.13.0) After (v2.0.0)
Vendored dependency size (MB) 40 6
Direct dependencies 15 6
Indirect dependencies 95 34

Key changes

Full Changelog: oapi-codegen/oapi-codegen@v1.16.2...v2.0.0

As a consumer, for the most part you shouldn't have much to do, as if you've been using oapi-codegen v1.15.0 or later, you should be using the new packages.

If you use this as a library or execute it as part of go run you will need to update module import paths:

-//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.yaml spec.yaml
+//go:generate go run github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen --config=config.yaml spec.yaml

If you're installing the package via go install, you'll need to run the following instead:

-go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest
+go install github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@latest
Move pkg/testutil to its own package + remove it

Similar to the below changes, we've moved pkg/testutil to its own package, and removed it from the codebase.

The changes for you as a consumer can be seen here.

This is almost a drop in replacement, the key difference is that there is no longer a RequestBuilder.Go method, as it is replaced by the RequestBuilder.GoWithHTTPHandler.

Remove deprecated packages:

For the packages:

  • pkg/chi-middleware
  • pkg/fiber-middleware
  • pkg/gin-middleware
  • pkg/middleware
  • pkg/runtime
  • pkg/types

These have been deprecated because they are now hosted as individual modules at https://github.com/oapi-codegen/. Doing so allows for their dependencies to be separated from each other, so your transitive module dependencies decrease. Any code which you generate using v1.15.0 will already refer to these modules in their new location.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled because a matching PR was automerged previously.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/github.com-deepmap-oapi-codegen-2.x branch 4 times, most recently from 8aa3fa5 to c29430a Compare November 12, 2023 01:04
@renovate renovate bot force-pushed the renovate/github.com-deepmap-oapi-codegen-2.x branch 7 times, most recently from 73e86bb to 7dc2225 Compare November 20, 2023 22:48
@renovate renovate bot force-pushed the renovate/github.com-deepmap-oapi-codegen-2.x branch 6 times, most recently from 721d081 to de98fe4 Compare November 30, 2023 16:04
@renovate renovate bot force-pushed the renovate/github.com-deepmap-oapi-codegen-2.x branch 4 times, most recently from 2492b43 to f42c4a1 Compare December 4, 2023 21:49
@renovate renovate bot force-pushed the renovate/github.com-deepmap-oapi-codegen-2.x branch 3 times, most recently from dfc2421 to f0f8173 Compare December 9, 2023 06:45
@renovate renovate bot force-pushed the renovate/github.com-deepmap-oapi-codegen-2.x branch from f0f8173 to 9cc1e5f Compare December 9, 2023 06:54
Copy link
Contributor Author

renovate bot commented Dec 9, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@hiroyoshii hiroyoshii closed this Dec 9, 2023
Copy link
Contributor Author

renovate bot commented Dec 9, 2023

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 2.x releases. But if you manually upgrade to 2.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/github.com-deepmap-oapi-codegen-2.x branch December 9, 2023 07:06
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