File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -716,17 +716,19 @@ class << self
716716 end
717717
718718 if val.key?(:items) and val[:items].key?(:enum)
719+ #before we were getting in all these cases a random value from the enum, now we are getting the first position by default
720+ #the reason is to avoid confusion later in case we want to compare two swaggers and verify the changes
719721 if type==:only_value
720722 if val[:items][:enum][0].is_a?(String)
721- example << " [\" " + val[:items][:enum].sample + "\" ] "
723+ example << " [\" " + val[:items][:enum][0] + "\" ] "
722724 else
723- example << " [" + val[:items][:enum].sample + "] "
725+ example << " [" + val[:items][:enum][0] + "] "
724726 end
725727 else
726728 if val[:items][:enum][0].is_a?(String)
727- example << " #{ prop . to_sym } : [\" " + val[:items][:enum].sample + "\" ], "
729+ example << " #{ prop . to_sym } : [\" " + val[:items][:enum][0] + "\" ], "
728730 else
729- example << " #{ prop . to_sym } : [" + val[:items][:enum].sample + "], "
731+ example << " #{ prop . to_sym } : [" + val[:items][:enum][0] + "], "
730732 end
731733 end
732734 else
You can’t perform that action at this time.
0 commit comments