Skip to content

Instantly share code, notes, and snippets.

@antoniogarrote
Created July 26, 2017 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antoniogarrote/faaf1f1bac53f1f1484a6671fa149e51 to your computer and use it in GitHub Desktop.
Save antoniogarrote/faaf1f1bac53f1f1484a6671fa149e51 to your computer and use it in GitHub Desktop.
(deftest error-1
(let [input {"Foo" {:properties {:id "string"}}
"Foos" "Foo[]"}
expanded (expanded-form "Foos" input)
canonical (canonical-form expanded)]
(is (= canonical
{:type "array",
:items
{:properties {"id" {:type "string", :required true}},
:additionalProperties true,
:type "object"}}))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment