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

Chore: Downgrade kin-openapi to v0.112.0 #656

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

xnyo
Copy link
Member

@xnyo xnyo commented Mar 27, 2023

What this PR does / why we need it:

Downgrade kin-openapi to v0.112.0.

(Bumped by dependabot from v0.94.0 on c7f540c)

Versions from v0.113.0+ cause the following issue when trying to build Grafana core due to a dependency conflict:

╰─❯ make gen-go
generate code from .cue files
go generate ./pkg/plugins/plugindef
# github.com/deepmap/oapi-codegen/pkg/codegen
/home/giuseppe/go/pkg/mod/github.com/spinillos/oapi-codegen@v1.12.5-0.20230206122001-6a05ca88e18e/pkg/codegen/schema.go:86:27: undefined: openapi3.ExtensionProps
/home/giuseppe/go/pkg/mod/github.com/spinillos/oapi-codegen@v1.12.5-0.20230206122001-6a05ca88e18e/pkg/codegen/schema.go:311:38: invalid operation: schema.AdditionalProperties != nil (mismatched types openapi3.AdditionalProperties and untyped nil)
/home/giuseppe/go/pkg/mod/github.com/spinillos/oapi-codegen@v1.12.5-0.20230206122001-6a05ca88e18e/pkg/codegen/schema.go:312:47: cannot use schema.AdditionalProperties (variable of type openapi3.AdditionalProperties) as *openapi3.SchemaRef value in argument to GenerateGoSchema
/home/giuseppe/go/pkg/mod/github.com/spinillos/oapi-codegen@v1.12.5-0.20230206122001-6a05ca88e18e/pkg/codegen/merge_schemas.go:215:32: invalid operation: s1.AdditionalProperties != nil (mismatched types openapi3.AdditionalProperties and untyped nil)
/home/giuseppe/go/pkg/mod/github.com/spinillos/oapi-codegen@v1.12.5-0.20230206122001-6a05ca88e18e/pkg/codegen/merge_schemas.go:218:32: invalid operation: s2.AdditionalProperties != nil (mismatched types openapi3.AdditionalProperties and untyped nil)
/home/giuseppe/go/pkg/mod/github.com/spinillos/oapi-codegen@v1.12.5-0.20230206122001-6a05ca88e18e/pkg/codegen/operations.go:129:22: pd.Spec.ExtensionProps undefined (type *openapi3.Parameter has no field or method ExtensionProps)
/home/giuseppe/go/pkg/mod/github.com/spinillos/oapi-codegen@v1.12.5-0.20230206122001-6a05ca88e18e/pkg/codegen/operations.go:130:57: pd.Spec.ExtensionProps undefined (type *openapi3.Parameter has no field or method ExtensionProps)
/home/giuseppe/go/pkg/mod/github.com/spinillos/oapi-codegen@v1.12.5-0.20230206122001-6a05ca88e18e/pkg/codegen/operations.go:833:32: param.Spec.ExtensionProps undefined (type *openapi3.Parameter has no field or method ExtensionProps)
/home/giuseppe/go/pkg/mod/github.com/spinillos/oapi-codegen@v1.12.5-0.20230206122001-6a05ca88e18e/pkg/codegen/prune.go:38:21: cannot use &swagger.Components (value of type **openapi3.Components) as *openapi3.Components value in argument to walkComponents
/home/giuseppe/go/pkg/mod/github.com/spinillos/oapi-codegen@v1.12.5-0.20230206122001-6a05ca88e18e/pkg/codegen/prune.go:147:20: cannot use ref.Value.AdditionalProperties (variable of type openapi3.AdditionalProperties) as *openapi3.SchemaRef value in argument to walkSchemaRef
/home/giuseppe/go/pkg/mod/github.com/spinillos/oapi-codegen@v1.12.5-0.20230206122001-6a05ca88e18e/pkg/codegen/schema.go:312:47: too many errors
pkg/plugins/plugindef/plugindef.go:12: running "go": exit status 1
make: *** [Makefile:73: gen-cue] Error 1

Which issue(s) this PR fixes:

Special notes for your reviewer:

@xnyo xnyo added chore dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Mar 27, 2023
@xnyo xnyo requested a review from a team as a code owner March 27, 2023 16:15
@xnyo xnyo self-assigned this Mar 27, 2023
@xnyo xnyo requested review from wbrowne and marefr and removed request for a team March 27, 2023 16:15
@xnyo xnyo merged commit 89dbbfb into main Mar 27, 2023
@xnyo xnyo deleted the giuseppe/downgrade-kin-openapi-v0.112.0 branch March 27, 2023 16:18
@andresmgot
Copy link
Contributor

is @spinillos aware of this? we should update that forked library it seems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore dependencies Pull requests that update a dependency file go Pull requests that update Go code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants