async curateCollectionSpecification(
    index,
    collection,
    spec,
    dryRun = false,
    verbose = false,
  ) {
    let error = "";
    const processed = {
      fields: {},
      strict: spec.strict || false,
      validators: null,
    };
    const allowed = ["strict", "fields", "validators"];

    if (!checkAllowedProperties(spec, allowed)) {
      error = assertionError.get(
        "unexpected_properties",
        `${index}.${collection}`,
        allowed.join(", "),
      );

      if (verbose) {
        return { errors: [error.message], isValid: false };
      }

      throw error;
    }

    if (spec.fields) {
      const result = this.structureCollectionValidation(
        spec,
        index,
        collection,
        verbose,
      );

      if (result.isValid === false) {
        if (verbose) {
          // do not fail fast if we need verbose errors
          return result;
        }

        throw assertionError.get(
          "invalid_specifications",
          result.errors.join("\n\t- "),
        );
      }
      processed.fields = result;
    }

    if (spec.validators && Array.isArray(spec.validators)) {
      try {
        const filterId = this.curateValidatorFilter(
          index,
          collection,
          spec.validators,
          dryRun,
        );

        processed.validators = filterId;
      } catch (e) {
        global.kuzzle.log.error(e);
        throw assertionError.getFrom(e, "invalid_filters", e.message);
      }
    }

    return processed;
  }
@param {string} index
@param {string} collection
@param {CollectionSpecification} spec
@param {boolean} [dryRun]
@param {boolean} [verbose]
@returns {Promise<CollectionSpecification>}
@rejects PreconditionError