Skip to main content

Working with reusable components

OAS 3.0 brings reusable components to API definitions.

Reusable components allow you to use an element in several parts of your API, without having to define it multiple times.

If you need to reuse the same header in ten different operations, you can create a component, and then refer to the component in all the operations where it is needed. Then, if you need to edit the header, you do not need to do it in all ten operations. You can simply modify the component, and the change is automatically propagated to all the elements that use it.

The following components are supported:

  • Path variables
  • Query parameters
  • Headers
  • Responses

Components are visible in the COMPONENTS tab in the left panel.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!