OpenAPI 3.x essentials

  • paths: endpoints + operations; components: reusable schemas, params, responses — referenced with $ref
  • operationId: unique per-operation identifier — used by SDK generators to name functions
  • requestBody: OpenAPI 3.x way to define POST/PUT body (not in: body parameter)
  • nullable in 3.1: type: [string, null] — standard JSON Schema, not nullable: true
  • example = single value; examples = multiple named scenarios with descriptions for documentation

Question 0 of 5

In OpenAPI 3.x, what is the difference between "paths" and "components"?