C. "active" property should be an object with a type key
D. Missing comma after "email" property
Solution
Step 1: Check property definitions
Each property must be an object with a "type" key. "active" is given as a string "boolean" instead of an object.
Step 2: Validate other parts
"id" type integer is correct, "required" does not need "active", and commas are correctly placed.
Final Answer:
"active" property should be an object with a type key -> Option C
Quick Check:
Property format = object with type key [OK]
Hint: Properties must be objects with type keys, not strings [OK]
Common Mistakes:
Writing property types as strings directly
Forgetting to wrap property details in objects
Assuming required means all properties
5. You want to define a schema for a REST API response that returns a list of users, where each user has a username (string) and roles (array of strings). Which schema snippet correctly represents this?