> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usebruno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create OpenAPI Specification (OAS)

Bruno provides a powerful interface for creating and managing OpenAPI Specifications (OAS). You can either design a new specification from scratch and view one as existing Open API spec.

## Viewing Existing OAS Files

You can view and interact with existing OAS files in Bruno using a SwaggerUI-like interface:

1. Enable OpenAPI Spec feature from **Preferences** to start working with it.

<img src="https://mintcdn.com/bruno-a6972042/bhHnFle6fniGMyOW/images/screenshots/open-api/enable-openapi-spec-settings.webp?fit=max&auto=format&n=bhHnFle6fniGMyOW&q=85&s=1d25e1c711e6f6924703ea6636137e9e" alt="enable-openapi-spec" width="2468" height="1354" data-path="images/screenshots/open-api/enable-openapi-spec-settings.webp" />

2. Select **Open API Spec** from dropdown in left hand side menu.

<img src="https://mintcdn.com/bruno-a6972042/bhHnFle6fniGMyOW/images/screenshots/open-api/create-open-option-spec.webp?fit=max&auto=format&n=bhHnFle6fniGMyOW&q=85&s=666f46ce33acb33e551cb417384629e3" alt="open-open-api" width="2468" height="1354" data-path="images/screenshots/open-api/create-open-option-spec.webp" />

3. Browse and select your OAS file (`.yaml` or `.json`)
4. The specification will open in a dedicated section of your Bruno sidebar

<img src="https://mintcdn.com/bruno-a6972042/bhHnFle6fniGMyOW/images/screenshots/open-api/after-import-openapi-spec.webp?fit=max&auto=format&n=bhHnFle6fniGMyOW&q=85&s=420cfd6474577f090f94db691e9a7bb0" alt="view-open-api" width="2468" height="1576" data-path="images/screenshots/open-api/after-import-openapi-spec.webp" />

## Creating New OAS Files

1. Select **Create API Spec**  from dropdown

<img src="https://mintcdn.com/bruno-a6972042/bhHnFle6fniGMyOW/images/screenshots/open-api/create-open-option-spec.webp?fit=max&auto=format&n=bhHnFle6fniGMyOW&q=85&s=666f46ce33acb33e551cb417384629e3" alt="create-open-api" width="2468" height="1354" data-path="images/screenshots/open-api/create-open-option-spec.webp" />

2. Choose a name and location for your specification

<img src="https://mintcdn.com/bruno-a6972042/bhHnFle6fniGMyOW/images/screenshots/open-api/create-spec-location-modal.webp?fit=max&auto=format&n=bhHnFle6fniGMyOW&q=85&s=17e649e00bb70db6fa8c74ee7fc53961" alt="location-open-api" width="2468" height="1066" data-path="images/screenshots/open-api/create-spec-location-modal.webp" />

3. Click on **Create** to generate OAS file.

## Editing Your OAS File

Once created, you can edit your OAS file in Bruno's built-in editor:

1. The editor provides syntax highlighting
2. Use the sidebar to navigate through different sections of your API
3. Add or modify endpoints, parameters, and responses
4. Include examples and descriptions for better documentation

<img src="https://mintcdn.com/bruno-a6972042/bKrHa_JvyAqCslj1/images/screenshots/open-api/write-api-spec.webp?fit=max&auto=format&n=bKrHa_JvyAqCslj1&q=85&s=79e36eaa551f71ccbf2a284d108ff725" alt="write-api-spec" width="2468" height="1590" data-path="images/screenshots/open-api/write-api-spec.webp" />
