Fork me on GitHub
#malli
<
2020-04-25
>
sudakatux23:04:23

i have a question regarding the json-schema suport

sudakatux23:04:32

So if i go to the example:

sudakatux23:04:37

[:map {:title "Address"} [:id string?] [:tags [:set keyword?]] [:address [:map {:json-schema/title "Something"} [:street {:json-schema/title "Something Else"} string?] [:city string?] [:zip int?] [:lonlat [:tuple double? double?]]]]]

sudakatux23:04:12

and add title to :street that will not work i would expect to see "Something Else" as a title property for street

sudakatux23:04:42

I do see "Something" as the title for Addess

sudakatux23:04:52

Generated JSON-schema :

sudakatux23:04:29

{:type "object",
 :properties {:id {:type "string"},
              :tags {:type "array",
                     :items {:type "string"},
                     :uniqueItems true},
              :address {:type "object",
                        :properties {:street {:type "string"},
                                     :city {:type "string"},
                                     :zip {:type "integer",
                                           :format "int64"},
                                     :lonlat {:type "array",
                                              :items [{:type "number"}
                                                      {:type "number"}],
                                              :additionalItems false}},
                        :required [:street :city :zip :lonlat],
                        :title "Something"}},
 :required [:id :tags :address],
 :title "Address"}

sudakatux23:04:25

Why is not "Something Else" a title for street am i missing something?