{"id":15439511,"url":"https://github.com/joelittlejohn/js-ps","last_synced_at":"2025-04-19T18:42:58.094Z","repository":{"id":62433137,"uuid":"68252779","full_name":"joelittlejohn/js-ps","owner":"joelittlejohn","description":"Convert JSON schema to Prismatic/Plumatic schema","archived":false,"fork":false,"pushed_at":"2016-12-21T16:31:04.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-18T11:24:10.520Z","etag":null,"topics":["clojure","jsonschema","schema"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joelittlejohn.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":"2016-09-14T23:53:49.000Z","updated_at":"2019-02-05T08:47:28.000Z","dependencies_parsed_at":"2022-11-01T21:01:02.433Z","dependency_job_id":null,"html_url":"https://github.com/joelittlejohn/js-ps","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelittlejohn%2Fjs-ps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelittlejohn%2Fjs-ps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelittlejohn%2Fjs-ps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelittlejohn%2Fjs-ps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joelittlejohn","download_url":"https://codeload.github.com/joelittlejohn/js-ps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240404872,"owners_count":19796083,"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","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":["clojure","jsonschema","schema"],"created_at":"2024-10-01T19:07:05.953Z","updated_at":"2025-03-02T21:31:10.706Z","avatar_url":"https://github.com/joelittlejohn.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# js-ps\n\nConvert JSON schema to Prismatic/Plumatic schema. Supports complex types and arbitrary levels of nesting.\n\n## Usage\n\nAdd to your lein dependencies:\n\n\n![Latest version](https://clojars.org/js-ps/latest-version.svg)\n\nConvert a JSON schema:\n\n```clj\n(ns foo\n  (:require [js-ps.core :refer [-\u003eprismatic]]\n            [schema.core :as s]))\n\n(def json-schema\n  {:type \"object\"\n   :properties {:a {:type \"string\"}\n                :b {:type \"integer\"}\n                :c {:type \"array\"\n                    :items {:type \"boolean\"}}}})\n\n(def prismatic-schema\n  (-\u003eprismatic json-schema)\n```\n\nYou can use _**local**_ refs in your schema, these are assumed to be resolvable in the given schema:\n\n```clj\n(def json-schema\n  {:type \"object\"\n   :properties {:a {\"$ref\" \"#/definitions/a\"}}\n   :definitions {:a {:type \"string\"}}})\n\n(def prismatic-schema\n  (-\u003eprismatic json-schema)\n```\n\nalternatively, you can pass a parent document against which refs will be resolved:\n\n\n```clj\n(def json-schema\n  {:type \"object\"\n   :properties {:a {\"$ref\" \"#/definitions/a\"}}})\n\n(def document\n  {:definitions {:a {:type \"string\"}}})\n\n(def prismatic-schema\n  (-\u003eprismatic json-schema document)\n```\n\n## Feature support\n\nThis is largely for use with ring-swagger so support for JSON schema features is not intended to be exhaustive. The supported schema rules include:\n\n* additionalProperties\n* description\n* enum\n* items (but not tuples)\n* oneOf\n* properties\n* required\n* type (but not union types)\n* $ref (but only local refs, by path)\n\n## License\n\nCopyright © 2016 Joe Littlejohn\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelittlejohn%2Fjs-ps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoelittlejohn%2Fjs-ps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelittlejohn%2Fjs-ps/lists"}