Start here. This is the direct spoken answer to practice first.
Why this question matters
OpenAPI is a machine-readable contract used by people, generated clients, tests, gateways, and change-review tooling. Swagger UI is only one view over that artifact.
OpenAPI describes the API contract: routes, methods, request bodies, response shapes, status codes, and security requirements. Swagger UI is only one consumer of that contract. I want the generated spec to match real API behavior. If the spec is wrong, clients build against the wrong contract.