Skip to content

Commit

Permalink
fix(openapi): correct api generation for map (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdada authored and caicloud-bot committed Aug 14, 2018
1 parent a5071a1 commit 35f5d63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/generators/swagger/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func (g *Generator) schemaForType(typ *api.Type) *spec.Schema {
if elemSchema == nil {
break
}
schema := spec.MapProperty(elemSchema)
schema = spec.MapProperty(elemSchema)
schema.Title = fmt.Sprintf("map[%s]%s", keySchema.Title, elemSchema.Title)
schema.Items = &spec.SchemaOrArray{
Schema: keySchema,
Expand Down

0 comments on commit 35f5d63

Please sign in to comment.