-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Problem statement
gen model-package with relative path has incorrect imports from v0.25.0
Command
swagger generate server -P v1.Principal -A iotx -t ./ -f ./swagger/swagger.yaml --model-package=../pkg/endpoint/v1
Imports
v0.24.0
...
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
v1 "github.com/kaisawind/iotx/pkg/endpoint/v1"
)
...
v0.25.0
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/runtime/security"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
"github.com/kaisawind/iotx/apiserver/restapi/operations"
"github.com/kaisawind/iotx/apiserver/restapi/operations/command"
"github.com/kaisawind/iotx/apiserver/restapi/operations/device"
"github.com/kaisawind/iotx/apiserver/restapi/operations/logr"
"github.com/kaisawind/iotx/apiserver/restapi/operations/oauth"
"github.com/kaisawind/iotx/apiserver/restapi/operations/product"
"github.com/kaisawind/iotx/apiserver/restapi/operations/rule"
"github.com/kaisawind/iotx/apiserver/restapi/operations/system"
"github.com/kaisawind/iotx/apiserver/restapi/operations/topic"
"github.com/kaisawind/iotx/apiserver/restapi/operations/user"
"github.com/kaisawind/iotx/pkg/endpoint/v1"
)
v0.24.0 ✔️
v0.25.0 ❌
v0.26.0 ❌
v0.27.0 ❌
Swagger specification
Has nothing to do with swagger
Steps to reproduce
swagger generate server -P v1.Principal -A iotx -t ./ -f ./swagger/swagger.yaml --model-package=../pkg/endpoint/v1
Environment
swagger version: 0.27.0
go version: 1.16.5
OS: Linux 5.10.42-1-MANJARO
Metadata
Metadata
Assignees
Labels
No labels