Class JsonSchemaAfterWriteChecker
java.lang.Object
org.restheart.mongodb.interceptors.JsonSchemaBeforeWriteChecker
org.restheart.mongodb.interceptors.JsonSchemaAfterWriteChecker
- All Implemented Interfaces:
ConfigurablePlugin,ExchangeTypeResolver<MongoRequest,,MongoResponse> Interceptor<MongoRequest,,MongoResponse> MongoInterceptor,Plugin
Checks documents according to the specified JSON schema
This intercetor is able to check PATCH requests (excluding bulk PATCH). Other
requests are checked by jsonSchemaBeforeWrite
It checks the request content against the JSON schema specified by the
'jsonSchema' collection metadata:
{ "jsonSchema": { "schemaId": <schemaId> "schemaStoreDb": <schemaStoreDb> } }
schemaStoreDb is optional, default value is same db
{ "jsonSchema": { "schemaId": <schemaId> "schemaStoreDb": <schemaStoreDb> } }
schemaStoreDb is optional, default value is same db
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Field Summary
Fields inherited from class org.restheart.mongodb.interceptors.JsonSchemaBeforeWriteChecker
SCHEMA_ID_PROPERTY, SCHEMA_STORE_DB_PROPERTY, SKIP_NOT_SUPPORTED_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(MongoRequest request, MongoResponse response) booleanresolve(MongoRequest request, MongoResponse response) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.restheart.plugins.ConfigurablePlugin
arg, argOrDefaultMethods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseType
-
Constructor Details
-
JsonSchemaAfterWriteChecker
public JsonSchemaAfterWriteChecker()
-
-
Method Details
-
handle
- Specified by:
handlein interfaceInterceptor<MongoRequest,MongoResponse> - Overrides:
handlein classJsonSchemaBeforeWriteChecker- Throws:
Exception
-
resolve
- Specified by:
resolvein interfaceInterceptor<MongoRequest,MongoResponse> - Overrides:
resolvein classJsonSchemaBeforeWriteChecker
-