OpenAPI & Swagger Vocabulary

Tip: An OpenAPI spec is both documentation and a contract — generate SDKs and mocks from the same source.

0 / 5 completed

Exercise 1 of 5

The backend engineer says: 'Each operation in our OpenAPI spec has an operationId — like listUsers, createUser, getUserById. Code generators use it to name SDK methods.'

What is an operationId in an OpenAPI specification?

Exercise 2 of 5

The architect says: 'We use $ref to avoid duplication — the error schema is defined once in components/schemas and referenced everywhere.'

What does $ref do in an OpenAPI specification?

Exercise 3 of 5

The security engineer says: 'Our API uses Bearer token authentication — defined as a securityScheme of type http with scheme bearer, then referenced in each protected operation.'

Where are authentication schemes defined in an OpenAPI spec?

Exercise 4 of 5

The team discusses: 'Path parameters are part of the URL like /users/42. Query parameters come after the ? like /users?role=admin. Both are defined in the parameters array.'

What is the difference between a path parameter and a query parameter in OpenAPI?

Exercise 5 of 5

The developer says: 'We use Swagger UI for internal testing and Redoc for the public developer portal — both generated from the same OpenAPI YAML file.'

What is the main difference between Swagger UI and Redoc?