(prepare-schema* input)
(prepare-schema* input params)
Prepares JSON Schema based on input string or map. An optional parameter map can be supplied to refer to relative file schemas via classpath in $ref fields.
Setting :classpath-aware? to true enables absolute classpath resolution. (prepare-schema* input {:classpath-aware? true})
Setting :default-resolution-scope enables relative classpath resolution. Make sure to not use HTTP URIs in schema $id fields, as this will cause it to resort to default $ref resolution via HTTP. (prepare-schema* input {:classpath-aware? true :default-resolution-scope "classpath://schemas/"})
Prepares JSON Schema based on input string or map. An optional parameter map can be supplied to refer to relative file schemas via classpath in $ref fields. Setting :classpath-aware? to true enables absolute classpath resolution. (prepare-schema* input {:classpath-aware? true}) Setting :default-resolution-scope enables relative classpath resolution. Make sure to not use HTTP URIs in schema $id fields, as this will cause it to resort to default $ref resolution via HTTP. (prepare-schema* input {:classpath-aware? true :default-resolution-scope "classpath://schemas/"})
Validate JSON according to JSON Schema.
If validation passes without errors, returns json. Throws ex-info with data on all errors.
Supports draft-04 -> draft-07.
To switch draft versions, simply use the according version notation in the $schema uri: http://json-schema.org/draft-04/schema http://json-schema.org/draft-06/schema http://json-schema.org/draft-07/schema
JSON and JSON Schema params has to be input as either a JSON encoded string or EDN (map for both or vector for JSON).
You can pass optional parameter :include-original-exception, in case you want the underlying exception to bubble up.
Validate JSON according to JSON Schema. If validation passes without errors, returns json. Throws ex-info with data on all errors. Supports draft-04 -> draft-07. To switch draft versions, simply use the according version notation in the $schema uri: http://json-schema.org/draft-04/schema http://json-schema.org/draft-06/schema http://json-schema.org/draft-07/schema JSON and JSON Schema params has to be input as either a JSON encoded string or EDN (map for both or vector for JSON). You can pass optional parameter :include-original-exception, in case you want the underlying exception to bubble up.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close