Change spec location

This commit is contained in:
alonso.torres 2024-07-04 15:16:58 +02:00
parent 53d3b2abbc
commit c2564eaf65
8 changed files with 28 additions and 10 deletions

View file

@ -907,10 +907,6 @@
::oapi/format "password"}}) ::oapi/format "password"}})
;; FIXME: this should not be here
(define! ::plugin-data
[:map-of {:gen/max 5} :string :string])
;; ---- PREDICATES ;; ---- PREDICATES
(def valid-safe-number? (def valid-safe-number?

View file

@ -14,6 +14,7 @@
[app.common.types.color.generic :as-alias color-generic] [app.common.types.color.generic :as-alias color-generic]
[app.common.types.color.gradient :as-alias color-gradient] [app.common.types.color.gradient :as-alias color-gradient]
[app.common.types.color.gradient.stop :as-alias color-gradient-stop] [app.common.types.color.gradient.stop :as-alias color-gradient-stop]
[app.common.types.plugins :as ctpg]
[app.common.uuid :as uuid] [app.common.uuid :as uuid]
[clojure.test.check.generators :as tgen] [clojure.test.check.generators :as tgen]
[cuerdas.core :as str])) [cuerdas.core :as str]))
@ -88,7 +89,7 @@
[:gradient {:optional true} [:maybe ::gradient]] [:gradient {:optional true} [:maybe ::gradient]]
[:image {:optional true} [:maybe ::image-color]] [:image {:optional true} [:maybe ::image-color]]
[:plugin-data {:optional true} [:plugin-data {:optional true}
[:map-of {:gen/max 5} :keyword ::sm/plugin-data]]] [:map-of {:gen/max 5} :keyword ::ctpg/plugin-data]]]
[::sm/contains-any {:strict true} [:color :gradient :image]]]) [::sm/contains-any {:strict true} [:color :gradient :image]]])
(sm/define! ::recent-color (sm/define! ::recent-color

View file

@ -15,6 +15,7 @@
[app.common.types.component :as ctk] [app.common.types.component :as ctk]
[app.common.types.components-list :as ctkl] [app.common.types.components-list :as ctkl]
[app.common.types.pages-list :as ctpl] [app.common.types.pages-list :as ctpl]
[app.common.types.plugins :as ctpg]
[app.common.types.shape-tree :as ctst] [app.common.types.shape-tree :as ctst]
[app.common.types.shape.layout :as ctl] [app.common.types.shape.layout :as ctl]
[app.common.uuid :as uuid])) [app.common.uuid :as uuid]))
@ -37,7 +38,7 @@
[:objects {:optional true} [:objects {:optional true}
[:map-of {:gen/max 10} ::sm/uuid :map]] [:map-of {:gen/max 10} ::sm/uuid :map]]
[:plugin-data {:optional true} [:plugin-data {:optional true}
[:map-of {:gen/max 5} :keyword ::sm/plugin-data]]]) [:map-of {:gen/max 5} :keyword ::ctpg/plugin-data]]])
(def check-container! (def check-container!
(sm/check-fn ::container)) (sm/check-fn ::container))

View file

@ -24,6 +24,7 @@
[app.common.types.container :as ctn] [app.common.types.container :as ctn]
[app.common.types.page :as ctp] [app.common.types.page :as ctp]
[app.common.types.pages-list :as ctpl] [app.common.types.pages-list :as ctpl]
[app.common.types.plugins :as ctpg]
[app.common.types.shape-tree :as ctst] [app.common.types.shape-tree :as ctst]
[app.common.types.typographies-list :as ctyl] [app.common.types.typographies-list :as ctyl]
[app.common.types.typography :as cty] [app.common.types.typography :as cty]
@ -59,7 +60,7 @@
[:media {:optional true} [:media {:optional true}
[:map-of {:gen/max 5} ::sm/uuid ::media-object]] [:map-of {:gen/max 5} ::sm/uuid ::media-object]]
[:plugin-data {:optional true} [:plugin-data {:optional true}
[:map-of {:gen/max 5} :keyword ::sm/plugin-data]]]) [:map-of {:gen/max 5} :keyword ::ctpg/plugin-data]]])
(def check-file-data! (def check-file-data!
(sm/check-fn ::data)) (sm/check-fn ::data))

View file

@ -10,6 +10,7 @@
[app.common.schema :as sm] [app.common.schema :as sm]
[app.common.types.color :as-alias ctc] [app.common.types.color :as-alias ctc]
[app.common.types.grid :as ctg] [app.common.types.grid :as ctg]
[app.common.types.plugins :as ctpg]
[app.common.types.shape :as cts] [app.common.types.shape :as cts]
[app.common.uuid :as uuid])) [app.common.uuid :as uuid]))
@ -45,7 +46,7 @@
[:guides {:optional true} [:guides {:optional true}
[:map-of {:gen/max 2} ::sm/uuid ::guide]] [:map-of {:gen/max 2} ::sm/uuid ::guide]]
[:plugin-data {:optional true} [:plugin-data {:optional true}
[:map-of {:gen/max 5} :keyword ::sm/plugin-data]]]]]) [:map-of {:gen/max 5} :keyword ::ctpg/plugin-data]]]]])
(def check-page-guide! (def check-page-guide!
(sm/check-fn ::guide)) (sm/check-fn ::guide))

View file

@ -0,0 +1,16 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns app.common.types.plugins
(:require
[app.common.schema :as sm]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SCHEMAS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(sm/define! ::plugin-data
[:map-of {:gen/max 5} :string :string])

View file

@ -20,6 +20,7 @@
[app.common.transit :as t] [app.common.transit :as t]
[app.common.types.color :as ctc] [app.common.types.color :as ctc]
[app.common.types.grid :as ctg] [app.common.types.grid :as ctg]
[app.common.types.plugins :as ctpg]
[app.common.types.shape.attrs :refer [default-color]] [app.common.types.shape.attrs :refer [default-color]]
[app.common.types.shape.blur :as ctsb] [app.common.types.shape.blur :as ctsb]
[app.common.types.shape.export :as ctse] [app.common.types.shape.export :as ctse]
@ -188,7 +189,7 @@
[:grow-type {:optional true} [:grow-type {:optional true}
[::sm/one-of #{:auto-width :auto-height :fixed}]] [::sm/one-of #{:auto-width :auto-height :fixed}]]
[:plugin-data {:optional true} [:plugin-data {:optional true}
[:map-of {:gen/max 5} :keyword ::sm/plugin-data]]]) [:map-of {:gen/max 5} :keyword ::ctpg/plugin-data]]])
(sm/define! ::group-attrs (sm/define! ::group-attrs
[:map {:title "GroupAttrs"} [:map {:title "GroupAttrs"}

View file

@ -9,6 +9,7 @@
[app.common.data :as d] [app.common.data :as d]
[app.common.schema :as sm] [app.common.schema :as sm]
[app.common.text :as txt] [app.common.text :as txt]
[app.common.types.plugins :as ctpg]
[app.common.uuid :as uuid])) [app.common.uuid :as uuid]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -31,7 +32,7 @@
[:modified-at {:optional true} ::sm/inst] [:modified-at {:optional true} ::sm/inst]
[:path {:optional true} [:maybe :string]] [:path {:optional true} [:maybe :string]]
[:plugin-data {:optional true} [:plugin-data {:optional true}
[:map-of {:gen/max 5} :keyword ::sm/plugin-data]]]) [:map-of {:gen/max 5} :keyword ::ctpg/plugin-data]]])
(def check-typography! (def check-typography!
(sm/check-fn ::typography)) (sm/check-fn ::typography))