Import from OpenAPI / Swagger
Bulk-import all your API endpoints from an OpenAPI 3.x or Swagger 2.0 spec file — JSON or YAML.
The OpenAPI importer reads your spec file and creates a fully configured request for every endpoint — method, URL, path params, query params, request body schema, and auth.
How to import
- 1
Navigate to Request Builder
Select Request Builder from the left sidebar inside your workspace.
- 2
Click Import → OpenAPI / Swagger
Choose your import method: upload a file, paste a public URL, or paste the spec content directly.
- 3
Review and confirm
The system checks the uploaded spec and displays its name, version, and validity status.
- 4
Generate collections
Clicking Import prompts Optraflow to create a collection with one request per endpoint, using bodies derived from the schema.
- 5
Validate endpoints
Clicking an endpoint from the collection list populates all details in the request section, allowing users to review it by executing the endpoint.
Example spec
openapi: "3.0.3"
info:
title: Example API
version: "1.0"
servers:
- url: https://api.example.com/v1
paths:
/users/{id}:
get:
summary: Get user by ID
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
"200":
description: Successful responseWhat gets generated
For each endpoint: the correct HTTP method, a populated URL with path params, sample request body from the schema, expected status code assertions, and authentication headers from the securitySchemes block.Best practices
- Keep specs updated — re-import whenever your API changes to keep tests in sync.
- Review generated requests — always verify auto-generated bodies before running.
- Add custom assertions — enhance generated tests with specific field validations.
- Use environments — configure different base URLs for dev, staging, and prod.
Troubleshooting
| Issue | Solution |
|---|---|
| Import fails | Validate your spec at editor.swagger.io before importing |
| Missing endpoints | Check that endpoints have the correct tags and are not marked deprecated |
| Wrong base URL | Update the base URL in Environment settings |
| Auth not applied | Configure the securitySchemes block in your spec, or set auth manually after import |
