script fixes

- validation script for new :block/type and examples properties graph
  now passes
- schema markdown links
pull/10438/head
Gabriel Horner 2023-09-25 11:22:19 -04:00
parent f3c7d50da9
commit 0ce19a5219
2 changed files with 10 additions and 8 deletions

View File

@ -40,8 +40,8 @@
;; Update refs to renamed classes
regex (re-pattern (str "\\[\\[(" (string/join "|" (keys renamed-classes)) ")\\]\\]"))
desc (string/replace desc* regex #(str "[[" (get renamed-classes (second %)) "]]"))]
;; Fix links to schema website docs
(string/replace desc #"\(/docs" "(https://schema.org/docs")))
;; Fix markdown and html links to schema website docs
(string/replace desc #"(\(|\")/docs" "$1https://schema.org/docs")))
(defn- strip-schema-prefix [s]
(string/replace-first s "schema:" ""))

View File

@ -20,7 +20,7 @@
[:block/uuid :uuid]
[:block/name {:optional true} :string]
[:block/original-name {:optional true} :string]
[:block/type {:optional true} :any] ;;TODO
[:block/type {:optional true} [:enum "property" "class" "object" "whiteboard"]]
[:block/content {:optional true} :string]
[:block/properties {:optional true}
[:map-of :uuid [:or
@ -30,7 +30,9 @@
:uuid
:map
[:vector [:or :keyword :uuid]]
[:set :uuid]]]]
[:set :uuid]
[:set :string]
[:set :int]]]]
[:block/created-at {:optional true} :int]
[:block/updated-at {:optional true} :int]
;; refs
@ -79,8 +81,9 @@
client-db-schema)
client-db-schema)]
(if-let [errors (->> ent-maps
(m/explain schema)
:errors)]
vals
(m/explain schema)
:errors)]
(do
(println "Found" (count errors) "errors:")
(pprint/pprint errors)
@ -93,8 +96,7 @@
(->> datoms
(reduce (fn [acc m]
(update acc (:e m) assoc (:a m) (:v m)))
{})
vals))
{})))
(def spec
"Options spec"