(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.(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.(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.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |