Go-swagger: it appears that vendoring breaks client generation assumption

Created on 13 Dec 2016  路  3Comments  路  Source: go-swagger/go-swagger

Problem statement

when generating a test client, and vendoring the openapi packages, the client transport configuration picks the non-vendored version.

src\github.com\stillwater\scoring_engine\api\client\mp_scoring_client.go:27: cannot use transport (type client.Runtime) as type "github.com/stillwater/scoring_engine/vendor/github.com/go-openapi/runtime".ClientTransport in argument to New:
*client.Runtime does not implement "github.com/stillwater/scoring_engine/vendor/github.com/go-openapi/runtime".ClientTransport (wrong type for Submit method)
have Submit(
"github.com/go-openapi/runtime".ClientOperation) (interface {}, error)
want Submit(*"github.com/stillwater/scoring_engine/vendor/github.com/go-openapi/runtime".ClientOperation) (interface {}, error)

Anyway to get around this to create test clients from the yaml spec?

install & setup

Most helpful comment

@Ravenwater have you managed to fix this by now? If so, how did you do it?

All 3 comments

you typically see this error when you have nested vendors

Any insights how to locate where the nesting comes from?

@Ravenwater have you managed to fix this by now? If so, how did you do it?

Was this page helpful?
0 / 5 - 0 ratings