Skip to content

unsupported type "invalid type" when add a new empty go file #2630

@youthy

Description

@youthy

Problem statement

I have a directory named docs
on file contents

package docs

// PostMessageParam ...
// swagger:parameters PostMessage
type PostMessageParam struct {
	// in: path
	// required: true
	UID string `json:"uid"`

}

// GetOneMessageParam ...
// swagger:parameters GetMessage
type GetOneMessageParam struct {
	// in: path
	// required: true
	UID string `json:"uid"`

	// in: path
	// required: true
	ID string `json:"id"`
}

It's ok to generate spec files

but when I add new empty new file in docs named resp.go

package docs

It generate the error unsupported type "invalid type"
why?

Please remove the sections that don't apply

Swagger specification

Steps to reproduce

Environment

swagger version: 0.27.0
go version: 1.13.1
OS: macos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions