malli

https://github.com/metosin/malli :malli:
ikitommi 2020-07-03T07:27:37.037900Z

@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

ikitommi 2020-07-03T07:29:24.040100Z

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

kwrooijen 2020-07-03T07:29:24.040200Z

Ah ok, good to hear

kwrooijen 2020-07-03T07:29:54.040900Z

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

ikitommi 2020-07-03T07:30:42.041500Z

Hmm.. could you link that with #86?

ikitommi 2020-07-03T07:31:44.042900Z

or do you mean here? Slack history kinda sucks

kwrooijen 2020-07-03T07:31:59.043100Z

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

kwrooijen 2020-07-03T07:32:32.043700Z

I had a bit of a monologue in that pr haha

ikitommi 2020-07-03T07:34:00.045900Z

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.

kwrooijen 2020-07-03T07:35:08.046300Z

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

👍 1
sudakatux 2020-07-03T11:32:34.048100Z

HI.

sudakatux 2020-07-03T11:32:48.048400Z

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

sudakatux 2020-07-03T11:32:54.048700Z

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

sudakatux 2020-07-03T11:33:44.049700Z

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

sudakatux 2020-07-03T11:38:43.050Z

{: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"}

ikitommi 2020-07-03T12:02:45.050800Z

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

ikitommi 2020-07-03T12:03:34.051800Z

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

sudakatux 2020-07-03T12:24:31.052400Z

cool thanks