Validate a specification.

validateSpecifications(content, [options], callback)

Arguments Type Description
content JSON object Content of the specification to validate
options JSON object Optional parameters
callback function Callback handling the response


Option Type Description Default
queuable boolean Make this request queuable or not true

Callback Response

Returns a boolean indicating whether or not the input specifications is valid or not.


Copied to clipboard!

JSONObject fooField = new JSONObject()
  .put("mandatory", "true")
  .put("type", "string")
  .put("defaultValue", "bar");

JSONObject fields = new JSONObject()
  .put("foo", fooField);

JSONObject specifications = new JSONObject()
  .put("strict", "true")
  .put("fields", fields);

  .collection("collection", "index")
  .validateSpecifications(specifications, new ResponseListener<Boolean>() {
    public void onSuccess(Boolean isValid) {
      // isValid is a boolean

  public void onError(JSONObject error) {
    // Handle error