malli

https://github.com/metosin/malli :malli:
ikitommi 2021-03-17T06:26:06.010400Z

@raymcdermott you can walk + update-properties, but if you want to walk also the map-entries (not just map values), you should paramertise the walk to walk those too. same for :refs.

raymcdermott 2021-03-17T09:04:04.011400Z

I will have to consider that once I get it all to work 🙂

raymcdermott 2021-03-17T17:17:12.016500Z

I have read the tests and am struggling to see how they help me to drop the swagger entries. I'm not even sure how to address them .... I know they are the the map in slot 1 of the key :ref but can see how to access that. None of them seem to show how to manipulate entries. And, I know it's my limitation but going to the schema processing itself is quite complex code to read out in my head.

raymcdermott 2021-03-17T17:20:54.016700Z

I was thinking that - since they are only things defined with maps, I could find a way to drop maps like I would do for some type with walk

ikitommi 2021-03-17T17:39:42.017100Z

I'll try it out

1
ikitommi 2021-03-17T18:09:59.017400Z

oh, no easy way for that. will add something.

😎 1
raymcdermott 2021-03-17T18:35:43.017700Z

thanks @ikitommi

ikitommi 2021-03-17T06:26:22.010500Z

some tests on walking here: https://github.com/metosin/malli/blob/master/test/malli/util_test.cljc#L672-L795

ikitommi 2021-03-17T06:27:39.010800Z

e.g. ::m/walk-refs & walk-schema-refs & ::m/walk-entry-vals.

ikitommi 2021-03-17T06:28:21.011Z

hopefully not too complex, balancing between “you can do anything with this” and “should be easy to do the simple stuff”

ikitommi 2021-03-17T06:29:37.011200Z

also, the dot-printer could have a option with schema->schema function to manipulate the schemas before printing?