Importing OpenAPI / Swagger
Import an API spec to auto-generate endpoints and data structures
2 min read
Instead of configuring APIs one by one by hand, importing an existing API spec auto-generates the endpoints and data structures for you. It's the fastest way to fill a prototype with real data.
Specs You Can Import
- OpenAPI 3.x (JSON or YAML)
- Swagger 2.0 (OpenAPI 2.0)
You can import from a file, or directly from a URL where the spec is published. Swagger 2.0 is recognized and handled automatically, so there's nothing extra to worry about.
How to Import
From the API add menu, the API list, the API editor, or the toolbar — anywhere — select Import OpenAPI… and choose a file or URL.
What Gets Generated Automatically
- API Collection — A group at the spec level. The name, description, and servers (base URL) come along with it.
- API endpoints — Each path (operation) becomes one API, with its method, path, parameters, and request body configured.
- Data Schema —
components.schemasbecome data structures, so you can bind response data to the screen. - Data Enum — The enumeration values defined in the spec.
- Response schemas — The per-status response structures.
Next Steps
How to connect an imported API's response to the screen is covered in Binding API Responses to UI.
With just the URL of a public API's OpenAPI document, you can start building a screen that works with real data in seconds. Try practicing first with public APIs like weather, exchange rates, or news.