Ref for maps object does not get created
yurisasuke opened this issue · 0 comments
yurisasuke commented
If you have a struct that has map with struct values, the swagger generated does not reference the AccessDefinition.
type Policys struct {
AccessRights map[string]AccessDefinitions `bson:"access_rights" json:"access_rights"`
}
type AccessDefinitions struct {
Name string `json:"name"`
}
This is what is produced instead of using ref to reference the already created AccessDefinitions :
schemas:
AccessDefinitions:
properties:
name:
type: string
type: object
Policys:
properties:
access_rights:
properties:
key:
properties:
name:
type: string
type: object
type: object
type: object ```