Liking cljdoc? Tell your friends :D

com.furkanbayraktar.json-schema.core


spec->json-schemaclj

(spec->json-schema spec)
(spec->json-schema spec additional-props? pretty?)

Converts given spec into a String representing a JSON schema.

additional-props? -> If false and spec does not define :json-schema/additionalProperties field, adds additionalProperties field as false to schema. By default, it is set to true, which means does not add anything to schema.

pretty? -> If false, skips prettifying JSON string. By default, it is set to true.

Converts given spec into a String representing a JSON schema.

additional-props? -> If false and spec does not define :json-schema/additionalProperties
                     field, adds additionalProperties field as false to schema. By default,
                     it is set to true, which means does not add anything to schema.

pretty?           -> If false, skips prettifying JSON string. By default, it is set to
                     true.
sourceraw docstring

spec->json-schema-mapclj

(spec->json-schema-map spec)
(spec->json-schema-map spec additional-props?)

Converts given spec into a Clojure map representing a JSON schema.

additional-props? -> If false and spec does not define :json-schema/additionalProperties field, adds additionalProperties field as false to schema. By default, it is set to true, which means does not add anything to schema.

Converts given spec into a Clojure map representing a JSON schema.

additional-props? -> If false and spec does not define :json-schema/additionalProperties
                     field, adds additionalProperties field as false to schema. By default,
                     it is set to true, which means does not add anything to schema.
sourceraw docstring

spec->namecljmultimethod

source

spec->spec-toolscljmultimethod

source

spit-schemas!clj

(spit-schemas! specs)
(spit-schemas! specs
               {:keys [delete-old-schemas? output-path additional-props?
                       convert-name? pretty?]
                :or {delete-old-schemas? true
                     output-path "schemas"
                     additional-props? true
                     convert-name? true
                     pretty? true}})

Converts given specs into JSON schemas and writes them into separate JSON files.

delete-old-schemas? -> If false, does not delete old schema files before creating new. Default value is true.

output-path -> Defines the output folder for generated schema files. Default value is 'schemas'.

additional-props? -> If false and spec does not define :json-schema/additionalProperties field, adds additionalProperties field as false to schema. By default, it is set to true, which means does not add anything to schema.

convert-name? -> If false, keeps spec name as file name, otherwise converts it to PascalCase. Example :test/test-spec becomes TestSpec.json.

pretty? -> If false, skips prettifying JSON string. By default, it is set to true.

Converts given specs into JSON schemas and writes them into separate JSON files.

delete-old-schemas? -> If false, does not delete old schema files before creating new.
                       Default value is true.

output-path         -> Defines the output folder for generated schema files. Default value
                       is 'schemas'.

additional-props?   -> If false and spec does not define :json-schema/additionalProperties
                       field, adds additionalProperties field as false to schema. By default,
                       it is set to true, which means does not add anything to schema.

convert-name?       -> If false, keeps spec name as file name, otherwise converts it to
                       PascalCase. Example :test/test-spec becomes TestSpec.json.

pretty?             -> If false, skips prettifying JSON string. By default, it is set to
                       true.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close