code: function inferTypeByKeyword(schema) {
    for (const keyword of objectKeywords) {
      if (keyword in schema) {
        return 'object'
      }
    }
    for (const keyword of arrayKeywords) {
      if (keyword in schema) {
        return 'array'
      }
    }
    return schema.type
  }
docs: Infer type based on keyword in order return an error when undefined or primitive is returned
  because ajv won't return an error
  https://json-schema.org/latest/json-schema-validation.html#rfc.section.6