0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

Add schema validation

This commit is contained in:
Florian Schroedl 2024-09-24 11:10:07 +02:00
parent 5e39f33bff
commit 44e4e85201

View file

@ -348,6 +348,12 @@
(def check-token-themes!
(sm/check-fn ::token-themes))
(def schema:active-token-themes
[:set string?])
(def valid-active-token-themes?
(sm/validator schema:active-token-themes))
;; === Tokens Lib
(defprotocol ITokensLib
@ -564,7 +570,8 @@
(validate [_]
(and (valid-token-sets? sets) ;; TODO: validate set-groups
(valid-token-themes? themes))))
(valid-token-themes? themes)
(valid-active-token-themes? active-themes))))
(defn valid-tokens-lib?
[o]