Skip to content

Commit

Permalink
Set comparer to StringComparer.Ordinal to make sure the order of defi…
Browse files Browse the repository at this point in the history
…nitions of schema is stable (JamesNK#300)

Signed-off-by: Kunlin Yu <[email protected]>
  • Loading branch information
kunlinyu committed Oct 14, 2022
1 parent 6352442 commit 6109fb0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public JSchema Generate(Type type, Required required, JsonProperty? memberProper
}

// definition schemas alphabetical ordered
foreach (KeyValuePair<string, JSchema> definitionSchema in definitionsSchemas.OrderBy(s => s.Key))
foreach (KeyValuePair<string, JSchema> definitionSchema in definitionsSchemas.OrderBy(s => s.Key, StringComparer.Ordinal))
{
definitions[definitionSchema.Key] = definitionSchema.Value;
}
Expand Down

0 comments on commit 6109fb0

Please sign in to comment.