{"id":31595308,"url":"https://github.com/escherize/malli-descriptions","last_synced_at":"2025-10-06T03:59:26.979Z","repository":{"id":64970453,"uuid":"580142459","full_name":"escherize/malli-descriptions","owner":"escherize","description":"Describe malli schemas in plain english","archived":false,"fork":false,"pushed_at":"2022-12-19T21:34:40.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-31T23:56:15.574Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/escherize.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-19T20:31:46.000Z","updated_at":"2023-07-31T23:56:15.574Z","dependencies_parsed_at":"2022-12-29T02:45:59.958Z","dependency_job_id":null,"html_url":"https://github.com/escherize/malli-descriptions","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/escherize/malli-descriptions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Fmalli-descriptions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Fmalli-descriptions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Fmalli-descriptions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Fmalli-descriptions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/escherize","download_url":"https://codeload.github.com/escherize/malli-descriptions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Fmalli-descriptions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278556181,"owners_count":26006081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-06T03:59:08.278Z","updated_at":"2025-10-06T03:59:26.972Z","avatar_url":"https://github.com/escherize.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Describe Malli Schemas\n\n\u003e (describe schema) =\u003e \"a string that is the schema's description\"\n\n```clojure\n(require [malli-descriptions.core :as md])\n```\n\n```clojure\n(md/describe [:map [:x int?]])\n;;=\u003e \"a map like {:x -\u003e \u003cinteger\u003e}\"\n```\n\n```clojure\n(md/describe [:map [:x int?]])\n;;=\u003e \"a map like {:x -\u003e \u003cinteger\u003e}\"\n```\n\n```clojure\n(md/describe [:map [:x {:optional true} int?] [:y :boolean]])\n;;=\u003e \"a map like {:x (optional) -\u003e \u003cinteger\u003e, :y -\u003e \u003cboolean\u003e}\"\n```\n\n```clojure\n(md/describe [:map {:closed true} [:x int?]])\n;;=\u003e \"a map like {:x -\u003e \u003cinteger\u003e} with no other keys\"\n```\n\n```clojure\n(md/describe [:map {:closed true} [:x {:optional true} int?] [:y :boolean]])\n;;=\u003e \"a map like {:x (optional) -\u003e \u003cinteger\u003e, :y -\u003e \u003cboolean\u003e} with no other keys\"\n```\n\n```clojure\n(md/describe [:=\u003e [:cat int?] int?])\n;;=\u003e \"a function that takes input: [integer] and returns integer\"\n```\n\n```clojure\n(md/describe\n  [:map [:j-code [:and :keyword\n                  [:fn {:description \"has length 4\"} #(= 4 (count (name %)))]]]])\n;;=\u003e \"a map like {:j-code -\u003e \u003ckeyword, and has length 4\u003e}\"\n\n```\n\n```clojure\n(md/describe [:map-of {:title \"dict\"} :int :string])\n\"a map (titled: ‘dict’) from \u003cinteger\u003e to \u003cstring\u003e\"\n```\n\n```clojure\n(md/describe [:vector [:sequential [:set :int]]])\n\"vector of sequence of set of integer\"\n```\n\n```clojure\n(md/describe [:multi {:dispatch :type\n                      :dispatch-description \"the type of animal\"}\n              [:dog [:map [:x :int]]]\n              [:cat :any]])\n\"one of \u003c:dog = a map like {:x -\u003e \u003cinteger\u003e} | :cat = anything\u003e dispatched by the type of animal\"\n```\n\n```clojure\n(md/describe [:multi {:dispatch :type}\n              [:dog [:map [:x :int]]]\n              [:cat :any]])\n\"one of \u003c:dog = a map like {:x -\u003e \u003cinteger\u003e} | :cat = anything\u003e dispatched by :type\"\n```\n\n```clojure\n(md/describe [:schema\n              {:registry {\"ConsCell\" [:maybe [:tuple :int [:ref \"ConsCell\"]]]}}\n              \"ConsCell\"])\n\"ConsCell \u003ca nullable a vector with exactly 2 items of type: integer, \u003e\\\"ConsCell\\\"\"\n```\n\n```clojure\n(md/describe\n  [:schema\n   {:registry\n    {\"Country\" [:map\n                {:closed true}\n                [:name [:enum :FI :PO]]\n                [:neighbors\n                 {:optional true}\n                 [:vector [:ref \"Country\"]]]],\n     \"Burger\" [:map\n               [:name string?]\n               [:description {:optional true} string?]\n               [:origin [:maybe \"Country\"]]\n               [:price pos-int?]],\n     \"OrderLine\" [:map\n                  {:closed true}\n                  [:burger \"Burger\"]\n                  [:amount int?]],\n     \"Order\" [:map\n              {:closed true}\n              [:lines [:vector \"OrderLine\"]]\n              [:delivery\n               [:map\n                {:closed true}\n                [:delivered boolean?]\n                [:address\n                 [:map\n                  [:street string?]\n                  [:zip int?]\n                  [:country \"Country\"]]]]]]}}\n   \"Order\"])\n\"Order which is: \u003cCountry is a map like {:name -\u003e \u003can enum of :FI, :PO\u003e, :neighbors (optional) -\u003e \u003cvector of \u003e\\\"Country\\\"} with ;;=\u003e no other keys, Burger is a map like {:name -\u003e \u003cstring\u003e, :description (optional) -\u003e \u003cstring\u003e, :origin -\u003e \u003ca nullable Country\u003e, :price -\u003e \u003cinteger greater than 0\u003e}, OrderLine is a map like {:burger -\u003e \u003cBurger\u003e, :amount -\u003e \u003cinteger\u003e} with no other keys, Order is a map like {:lines -\u003e \u003cvector of OrderLine\u003e, :delivery -\u003e \u003ca map like {:delivered -\u003e \u003cboolean\u003e, :address -\u003e \u003ca map like {:street -\u003e \u003cstring\u003e, :zip -\u003e \u003cinteger\u003e, :country -\u003e \u003cCountry\u003e}\u003e} with no other keys\u003e} with no other keys\u003e\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescherize%2Fmalli-descriptions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fescherize%2Fmalli-descriptions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescherize%2Fmalli-descriptions/lists"}