Skip to content

Fix broken build due to kin backwards-incompatible change#322

Merged
2 commits merged into
oapi-codegen:masterfrom
nevivurn:fix/kin-51-compat
Mar 22, 2021
Merged

Fix broken build due to kin backwards-incompatible change#322
2 commits merged into
oapi-codegen:masterfrom
nevivurn:fix/kin-51-compat

Conversation

@nevivurn

Copy link
Copy Markdown
Contributor

There was a backwards-incompatible change in github.com/getkin/kin-openapi 0.51.0: getkin/kin-openapi#326

This PR fixes the build & hopefully maintains the old behavior. Unfortunately, this means panicking on error, since that's what kin-openapi used to do: https://github.com/getkin/kin-openapi/blob/v0.50.0/openapi3filter/router.go#L87-L94

mikeschinkel added a commit to mikeschinkel/oapi-codegen that referenced this pull request Mar 22, 2021
@ghost ghost merged commit 88f937a into oapi-codegen:master Mar 22, 2021
ghost pushed a commit that referenced this pull request Mar 22, 2021
…)"

This reverts commit 88f937a.

The kin legacy routers force pulling in kin-openapi@0.52.0 which requires
Go 1.16
@ghost

ghost commented Mar 22, 2021

Copy link
Copy Markdown

I had to roll this back.

Pulling in that routers/legacy package forces kin-openapi 0.52.0, which uses the //go:embed directive, which breaks on go 1.14, which is our minimum supported version.

@nevivurn

Copy link
Copy Markdown
Contributor Author

Ah, I thought it was fine since oapi-codegen was using kin-openapi v0.50.0 when I wrote this. Fair enough.

I'm guessing that issues like these are going to be common as long as kin-openapi is sub-v1 and continues having breaking changes, which is unfortunate, but I guess that's what we get for depending on something sub-v1.

For now, I'll work around this by depending on my own fork. Thanks for the good work!

@fenollp

fenollp commented Mar 23, 2021

Copy link
Copy Markdown

Hi, I maintain kin-openapi. As you may have noted the dependency on go:embed is only in a test. Let me see if I can have this test run iff go>1.14.

@ghost

ghost commented Mar 23, 2021

Copy link
Copy Markdown

Oh cool!

@fenollp - Thank you so much for your work on kin-openapi. I can't imagine writing API's without it.

adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
…en#322)

Co-authored-by: Marcin Romaszewicz <47459980+deepmap-marcinr@users.noreply.github.com>
adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
…pi-codegen#322)"

This reverts commit e0a6e90.

The kin legacy routers force pulling in kin-openapi@0.52.0 which requires
Go 1.16
adrianpk added a commit to foorester/oapi-codegen that referenced this pull request May 31, 2024
…en#322)

Co-authored-by: Marcin Romaszewicz <47459980+deepmap-marcinr@users.noreply.github.com>
adrianpk added a commit to foorester/oapi-codegen that referenced this pull request May 31, 2024
…pi-codegen#322)"

This reverts commit 88f937a.

The kin legacy routers force pulling in kin-openapi@0.52.0 which requires
Go 1.16
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.

2 participants