-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Problem statement
If I have two separate structs with the same name but in different packages and they are used inside of other swagger:models the resulting swagger docs seems to cause clashes between the two types and shows properties incorrectly.
Is there a way to change the name that shows up in the generated docs?
Steps to reproduce
Consider the following:
package a
// swagger:model ModelA
type ModelA struct {
Foo int
Bar Baz
}
type Baz struct {
A string
}
// ...
package b
// swagger:model ModelB
type ModelB struct {
Foo string
Bar Baz
}
type Baz struct {
B int
}
ModelA and ModelB themselves show up just fine but the resulting docs only show 1 Baz (however there are actually 2: a.Baz and b.Baz). Since Baz is inside both ModelA and ModelB it will pick one of the two actual definitions and show that
Environment
swagger version: 0.29.0
go version: 18
OS: macOS Monterey 12.1
Metadata
Metadata
Assignees
Labels
No labels