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

Errors running tests: cannot use spec.NewSingleOrArray(OBJECT) etc #1980

Open
ainsleyclark opened this issue Feb 18, 2025 · 0 comments
Open

Comments

@ainsleyclark
Copy link

Describe the bug
I'm getting some issues when running tests for [email protected] as shown below:

../../../go/pkg/mod/github.com/swaggo/swag/[email protected]/operationv3.go:178:23: cannot use spec.NewSingleOrArray(OBJECT) (value of type "github.com/sv-tools/openapi/spec".SingleOrArray[string]) as *"github.com/sv-tools/openapi/spec".SingleOrArray[string] value in assignment
../../../go/pkg/mod/github.com/swaggo/swag/[email protected]/operationv3.go:189:23: cannot use spec.NewSingleOrArray(STRING) (value of type "github.com/sv-tools/openapi/spec".SingleOrArray[string]) as *"github.com/sv-tools/openapi/spec".SingleOrArray[string] value in assignment
../../../go/pkg/mod/github.com/swaggo/swag/[email protected]/operationv3.go:192:23: cannot use spec.NewSingleOrArray(STRING) (value of type "github.com/sv-tools/openapi/spec".SingleOrArray[string]) as *"github.com/sv-tools/openapi/spec".SingleOrArray[string] value in assignment
../../../go/pkg/mod/github.com/swaggo/swag/[email protected]/operationv3.go:256:24: cannot use spec.NewSingleOrArray(OBJECT) (value of type "github.com/sv-tools/openapi/spec".SingleOrArray[string]) as *"github.com/sv-tools/openapi/spec".SingleOrArray[string] value in assignment
../../../go/pkg/mod/github.com/swaggo/swag/[email protected]/operationv3.go:267:24: cannot use spec.NewSingleOrArray(STRING) (value of type "github.com/sv-tools/openapi/spec".SingleOrArray[string]) as *"github.com/sv-tools/openapi/spec".SingleOrArray[string] value in assignment
../../../go/pkg/mod/github.com/swaggo/swag/[email protected]/operationv3.go:270:24: cannot use spec.NewSingleOrArray(STRING) (value of type "github.com/sv-tools/openapi/spec".SingleOrArray[string]) as *"github.com/sv-tools/openapi/spec".SingleOrArray[string] value in assignment
../../../go/pkg/mod/github.com/swaggo/swag/[email protected]/operationv3.go:350:53: invalid operation: cannot index schema.Spec.Type (variable of type *"github.com/sv-tools/openapi/spec".SingleOrArray[string])
../../../go/pkg/mod/github.com/swaggo/swag/[email protected]/operationv3.go:391:12: invalid argument: prop.Type (variable of type *"github.com/sv-tools/openapi/spec".SingleOrArray[string]) for built-in len
../../../go/pkg/mod/github.com/swaggo/swag/[email protected]/operationv3.go:398:19: invalid operation: cannot index prop.Type (variable of type *"github.com/sv-tools/openapi/spec".SingleOrArray[string])
../../../go/pkg/mod/github.com/swaggo/swag/[email protected]/operationv3.go:400:10: invalid argument: prop.Items.Schema.Spec.Type (variable of type *"github.com/sv-tools/openapi/spec".SingleOrArray[string]) for built-in len
../../../go/pkg/mod/github.com/swaggo/swag/[email protected]/operationv3.go:400:10: too many errors

I'm not sure what could be causing these errors, or if someone has encountered this before?

Expected behavior
No errors.

Screenshots
If applicable, add screenshots to help explain your problem.

Your swag version

github.com/swaggo/http-swagger v1.3.4
github.com/swaggo/swag/v2 v2.0.0-rc4

Your go version
1.23.0

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

No branches or pull requests

1 participant