Fork me on GitHub
#malli
<
2020-07-03
>
ikitommi07:07:37

@kevin.van.rooijen handling map-entry properties is the last issue to be resolved to make the malli design complete for release, see https://github.com/metosin/malli/issues/116

ikitommi07:07:24

Have some ideas how to fix that elegantly, but comments on the issues most welcome

kwrooijen07:07:24

Ah ok, good to hear

kwrooijen07:07:54

I did some digging and realized I asked the same question 3 months ago haha (but no answer at that time)

ikitommi07:07:42

Hmm.. could you link that with #86?

ikitommi07:07:44

or do you mean here? Slack history kinda sucks

kwrooijen07:07:59

Apparently I asked that question in my PR to support qualified keywords in maps

kwrooijen07:07:32

I had a bit of a monologue in that pr haha

ikitommi07:07:00

there is a bunch of PRs I know are related to this, wanted to have this figured out before merging any of those in. Sorry for the lag with PRs.

kwrooijen07:07:08

Don't worry about it, it's a tough problem to handle

👍 3
sudakatux11:07:48

So what would be the correct type for a date LocalDateTime to be more specific

sudakatux11:07:54

:responses  {200 {:body [:vector
                                     [:map
                                      [:id int?]
                                      [:sender_id int?]
                                      [:conversation_id int?]
                                      [:created_at string?]
                                      [:state string?]]
                                     ]}      

sudakatux11:07:44

I tried inst? and it did not work. the error shows it as a string because of the conversion. but the validation seems to run before

sudakatux11:07:43

{:id 1,
  :message "string",
  :sender_id 1,
  :conversation_id 1,
  :created_at #object[java.time.LocalDateTime 0x4cc366e7 "2020-06-30T18:50:23.695073"],
  :state "UNREAD"}

ikitommi12:07:45

https://github.com/metosin/malli/issues/49 is the issue for adding proper (Java8+ & goog.*) dates.

ikitommi12:07:34

before that, [:fn (partial instance? LocalDateTime)] does the validation part