Closed nbardy closed 7 years ago
Comments not related to the code review:
Another thing that I would change is to have separate MetaData
schemas for pages and posts since not all keys are shared between them (home?
and navbar?
, for example). However, this requires reworking how post/page content is read so I'm okay with leaving this one for later.
I agree there are some weird inconsistencies with how nils/missing keys are dealt with. These ones I can consolidate on my own.
Great work :-)
Have you ever looked at (schema/defn ^:always-validate ...)
?
This would allow to validate parameters & result of a function - you will need no additional (schema/validate ...)
.
Usage is:
(schema/defn ^:always-validate
fn-name :- result-schema
"doc-string"
[param1 :- param1-schema
...]
)
Hey @nbardy are you still working on this?
Going to merge this to keep things moving along. I'll make the requested changes myself.
Added some tests and testing, but it could definitely use a little more.
The code has some inconsistencies between using nil values and missing keys in options maps. The schema could be made clearer if this was standardized.
https://github.com/cryogen-project/cryogen-core/issues/88