public class ValidateJsonSchemaOperation extends Object implements org.mule.runtime.api.lifecycle.Disposable, org.mule.runtime.api.lifecycle.Startable, org.mule.runtime.api.lifecycle.Stoppable, org.mule.runtime.api.lifecycle.Initialisable
| Constructor and Description |
|---|
ValidateJsonSchemaOperation() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
void |
initialise() |
void |
start() |
void |
stop() |
void |
validateSchema(JsonSchema jsonSchema,
Object content,
Collection<SchemaRedirect> schemaRedirects,
JsonSchemaDereferencingMode dereferencing,
boolean allowDuplicateKeys,
boolean allowArbitraryPrecision)
Validates that the input content is compliant with a given schema.
|
public void start()
start in interface org.mule.runtime.api.lifecycle.Startablepublic void stop()
stop in interface org.mule.runtime.api.lifecycle.Stoppable@Validator @Execution(value=CPU_INTENSIVE) @Throws(value=SchemaValidatorErrorTypeProvider.class) public void validateSchema(@ParameterGroup(name="Schema") JsonSchema jsonSchema, @TypeResolver(value=JsonAnyStaticTypeResolver.class) @Content Object content, @NullSafe @Optional Collection<SchemaRedirect> schemaRedirects, @Optional(defaultValue="CANONICAL") JsonSchemaDereferencingMode dereferencing, @Optional(defaultValue="true") @Placement(tab="Advanced") boolean allowDuplicateKeys, @Optional(defaultValue="false") @Placement(tab="Advanced") @Expression(value=NOT_SUPPORTED) boolean allowArbitraryPrecision)
jsonSchema - a JsonSchema as a parameter groupcontent - the json document to be validatedschemaRedirects - Allows to redirect any given URI in the Schema (or even the schema location itself) to any other
specific URI. The most common use case for this feature is to map external namespace URIs without the need to a local
resourcedereferencing - Draft v4 defines two dereferencing modes: canonical and inline.
CANONICAL is the default option, you can also specify INLINE.
This field affects only when you use Draft v4.allowDuplicateKeys - if true, the validator will allow duplicate keys, otherwise it will fail.allowArbitraryPrecision - if true, the validator will use arbitrary precision when reading floating point values,
otherwise double precision will be used.public void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionCopyright © 2024 MuleSoft, Inc.. All rights reserved.