Skip to content

Generate spec does not work with Go Modules #1681

@JeremyLoy

Description

@JeremyLoy

Problem statement

the swagger CLI tool does not work correctly when the target repository is a Go 1.11 Module. The tool should not use GOPATH/src to resolve dependencies, and instead use the GOPATH/pkg/mod The possible failure cases I have discovered are as follows:

  1. required dependency is not in GOPATH
    1. results in the CLI tool saying it cannot find dependency
  2. dependency in GOPATH is not the same as declared in MODULE
    1. individual types/functions/packages fail, rather than the dependency as a whole

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions