@@ -812,10 +812,30 @@ func TestToolForSchemas(t *testing.T) {
812812
813813 var (
814814 falseSchema = & schema {Not : & schema {}}
815- inSchema = & schema {Type : "object" , AdditionalProperties : falseSchema , Properties : map [string ]* schema {"p" : {Type : "integer" }}}
816- inSchema2 = & schema {Type : "object" , AdditionalProperties : falseSchema , Properties : map [string ]* schema {"p" : {Type : "string" }}}
817- outSchema = & schema {Type : "object" , AdditionalProperties : falseSchema , Properties : map [string ]* schema {"b" : {Type : "boolean" }}}
818- outSchema2 = & schema {Type : "object" , AdditionalProperties : falseSchema , Properties : map [string ]* schema {"b" : {Type : "integer" }}}
815+ inSchema = & schema {
816+ Type : "object" ,
817+ AdditionalProperties : falseSchema ,
818+ Properties : map [string ]* schema {"p" : {Type : "integer" }},
819+ PropertyOrder : []string {"p" },
820+ }
821+ inSchema2 = & schema {
822+ Type : "object" ,
823+ AdditionalProperties : falseSchema ,
824+ Properties : map [string ]* schema {"p" : {Type : "string" }},
825+ PropertyOrder : []string {"p" },
826+ }
827+ outSchema = & schema {
828+ Type : "object" ,
829+ AdditionalProperties : falseSchema ,
830+ Properties : map [string ]* schema {"b" : {Type : "boolean" }},
831+ PropertyOrder : []string {"b" },
832+ }
833+ outSchema2 = & schema {
834+ Type : "object" ,
835+ AdditionalProperties : falseSchema ,
836+ Properties : map [string ]* schema {"b" : {Type : "integer" }},
837+ PropertyOrder : []string {"b" },
838+ }
819839 )
820840
821841 // Infer both schemas.
@@ -850,6 +870,7 @@ func TestToolForSchemas(t *testing.T) {
850870 "AsOf" : {Type : "string" },
851871 "Source" : {Type : "string" },
852872 },
873+ PropertyOrder : []string {"Summary" , "AsOf" , "Source" },
853874 },
854875 "" )
855876}
0 commit comments