OpenAPI vocabulary

  • paths — all endpoints; each path has operations (get/post/put/patch/delete)
  • in: path/query/header/cookie — where the parameter is sent
  • $ref: "#/components/schemas/X" — reusable schema reference
  • required: [field] in schema — these fields are always present; others are optional
  • enum — list of the only allowed values for a field

Question 0 of 5

An OpenAPI YAML file begins with: openapi: "3.0.3"
info:
  title: Orders API
  version: "1.2.0"
servers:
  - url: https://api.example.com/v1

What do these top-level fields tell you?