Skip to content

Commit

Permalink
List of multiplexed models should be stable
Browse files Browse the repository at this point in the history
  • Loading branch information
isimluk committed Sep 7, 2020
1 parent d70a1e4 commit 3af199c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metaschema/parser/multiplexers.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package parser

import ()
import (
"sort"
)

// Multiplexer represents model to be generated in go code that does not exists in the metaschema.
// Such model is only needed for serialization&deserialization as json and xml schemas differ
Expand Down Expand Up @@ -34,7 +36,7 @@ func (metaschema *Metaschema) Multiplexers() []Multiplexer {
MultiplexedModel: v,
})
}

sort.Slice(result, func(i, j int) bool { return result[i].GoTypeName() < result[j].GoTypeName() })
return result
}

Expand Down

0 comments on commit 3af199c

Please sign in to comment.