5. Which statement about path parameters in OpenAPI is true?
- They are optional by default
- They must be marked required: true and appear in the path template
- They are placed in the request body
- They cannot have a schema
जवाब देखें
जवाब: They must be marked required: true and appear in the path template
Path parameters are always required and must match a template variable in the path.
पाठ: Parameters: Path, Query, Header and Cookie
6. How are status codes written as keys in an OpenAPI responses object?
- As strings such as '200' or ranges such as '4XX', plus an optional default
- As unquoted numbers only
- As HTTP reason phrases
- They are not part of responses
जवाब देखें
जवाब: As strings such as '200' or ranges such as '4XX', plus an optional default
Response keys are status code strings, ranges like 4XX, or default.
पाठ: Request Bodies, Responses and Status Codes