Bird
0
0

Which of the following is the correct syntax to define a property named email of type string in an OpenAPI schema?

easy📝 Syntax Q3 of 15
Rest API - API Documentation
Which of the following is the correct syntax to define a property named email of type string in an OpenAPI schema?
A"email": { "datatype": "string" }
B"email": "string"
C"email": { "type": "string" }
D"email": { "format": "string" }
Step-by-Step Solution
Solution:
  1. Step 1: Recall property definition syntax

    Properties are objects with a "type" key specifying data type.
  2. Step 2: Check each option's correctness

    "email": { "type": "string" } uses correct syntax: property name maps to an object with "type" key.
  3. Final Answer:

    "email": { "type": "string" } -> Option C
  4. Quick Check:

    Property type syntax = "type" key [OK]
Quick Trick: Use "type" key to define property data type [OK]
Common Mistakes:
MISTAKES
  • Using "datatype" instead of "type"
  • Assigning type as a string directly
  • Confusing "format" with "type"

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes