Skip to content
CodeKruPro

What does JSON schema validation catch?

QuizMedium

A test validates the response of GET /users/7 against a JSON schema (a file that lists the fields a response must have, and their types). Which problems can the schema check catch on its own? Choose all that apply.

  • A required field such as email is missing
  • The id comes back as the string "7" instead of a number
  • A status field holds a value outside its allowed list
  • The email is a valid address but belongs to another user

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in