mirror of
https://github.com/penpot/penpot.git
synced 2025-06-24 04:47:02 +02:00
📎 Temporary comment file schema validation
This commit is contained in:
parent
6de55ab444
commit
a0870624b6
1 changed files with 12 additions and 12 deletions
|
@ -445,18 +445,18 @@
|
||||||
Raises a validation exception on first error found."
|
Raises a validation exception on first error found."
|
||||||
|
|
||||||
([file] (validate-file! file nil))
|
([file] (validate-file! file nil))
|
||||||
([{:keys [id data] :as file} libraries]
|
([{:keys [data] :as file} libraries]
|
||||||
(when-not (valid-fdata? data)
|
;; (when-not (valid-fdata? data)
|
||||||
(if (some? *errors*)
|
;; (if (some? *errors*)
|
||||||
(vswap! *errors* conj
|
;; (vswap! *errors* conj
|
||||||
{:code :invalid-file-data-structure
|
;; {:code :invalid-file-data-structure
|
||||||
:hint (str/ffmt "invalid file data structure found on file '%'" id)
|
;; :hint (str/ffmt "invalid file data structure found on file '%'" id)
|
||||||
:file-id id})
|
;; :file-id id})
|
||||||
(ex/raise :type :validation
|
;; (ex/raise :type :validation
|
||||||
:code :data-validation
|
;; :code :data-validation
|
||||||
:hint (str/ffmt "invalid file data found on file '%'" id)
|
;; :hint (str/ffmt "invalid file data found on file '%'" id)
|
||||||
:file-id id
|
;; :file-id id
|
||||||
::sm/explain (get-fdata-explain data))))
|
;; ::sm/explain (get-fdata-explain data))))
|
||||||
|
|
||||||
;; If `libraries` is provided, this means the full file
|
;; If `libraries` is provided, this means the full file
|
||||||
;; validation is activated so we proceed to execute the
|
;; validation is activated so we proceed to execute the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue