mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 14:12:36 -05:00
Add schema validation
This commit is contained in:
parent
5e39f33bff
commit
44e4e85201
1 changed files with 8 additions and 1 deletions
|
@ -348,6 +348,12 @@
|
||||||
(def check-token-themes!
|
(def check-token-themes!
|
||||||
(sm/check-fn ::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
|
;; === Tokens Lib
|
||||||
|
|
||||||
(defprotocol ITokensLib
|
(defprotocol ITokensLib
|
||||||
|
@ -564,7 +570,8 @@
|
||||||
|
|
||||||
(validate [_]
|
(validate [_]
|
||||||
(and (valid-token-sets? sets) ;; TODO: validate set-groups
|
(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?
|
(defn valid-tokens-lib?
|
||||||
[o]
|
[o]
|
||||||
|
|
Loading…
Add table
Reference in a new issue