Bird
0
0

In an OpenAPI schema, which keyword is used to specify that a property is required?

easy📝 Conceptual Q2 of 15
Rest API - API Documentation
In an OpenAPI schema, which keyword is used to specify that a property is required?
A"mandatory"
B"mustHave"
C"needed"
D"required"
Step-by-Step Solution
Solution:
  1. Step 1: Recall OpenAPI schema keywords

    OpenAPI uses "required" as a list of property names that must be present.
  2. Step 2: Verify other options are incorrect

    Keywords like "mandatory", "mustHave", or "needed" are not valid in OpenAPI.
  3. Final Answer:

    "required" -> Option D
  4. Quick Check:

    Required keyword = "required" [OK]
Quick Trick: Use "required" array to list mandatory properties [OK]
Common Mistakes:
MISTAKES
  • Using incorrect keywords like "mandatory"
  • Confusing property attributes with keywords
  • Not listing required properties in an array

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes