SDK
SDK Jvm v1.x
2

validateSpecifications #

The validateSpecifications method checks if a validation specification is well formatted. It does not store or modify the existing specification.

When the validation specification is not formatted correctly, a detailed error message is returned to help you to debug.


:::: tabs ::: tab Java

Arguments #

  public CompletableFuture<Map<String, Object>> validateSpecifications(
      final String index,
      final String collection,
      final Map<String, Object> specifications)

ArgumentsTypeDescription
indexStringIndex name
collectionStringCollection name
specificationsMap<String, Object>Specifications to validate

specifications #

A Map<String, Object> representing the specifications.

This object must follow the Specification Structure.

Returns #

Returns a Map<String, Object> which contains information about the specifications validity.

It contains the following properties:

PropertyTypeDescription
validBooleanSpecifications validity
detailsArrayList<String>Specifications errors
descriptionStringGlobal description of errors

Usage #

<<< ./snippets/validate-specifications-java.java

::: ::: tab Kotlin

Arguments #

fun validateSpecifications(
    index: String,
    collection: String,
    specifications: Map<String, Any>?
  ): CompletableFuture<Map<String, Any?>>

ArgumentsTypeDescription
indexStringIndex name
collectionStringCollection name
specificationsMap<String, Any?>Specifications to validate

specifications #

A Map<String, Any?> representing the specifications.

This object must follow the Specification Structure.

Returns #

Returns a Map<String, Any?> which contains information about the specifications validity.

It contains the following properties:

PropertyTypeDescription
validBooleanSpecifications validity
detailsArrayList<String>Specifications errors
descriptionStringGlobal description of errors

Usage #

<<< ./snippets/validate-specifications-kotlin.kt

::: ::::