Skip to content

Importing OpenAPI

The fastest way to get a populated collection in Rewind is to import an OpenAPI 3.x document. The importer parses the spec, creates one collection from it, creates one folder per tag, and creates one request per operation.

Supported subset

Rewind accepts OpenAPI 3.0 and 3.1 documents, in JSON or YAML. The importer supports the common subset:

  • info.title becomes the collection name
  • info.description becomes the collection description
  • servers[0].url becomes a baseUrl environment variable
  • Path operations (get, post, put, patch, delete, head, options) become saved requests
  • tags[0] becomes the containing folder
  • Path parameters like {id} become {{id}} in the request URL
  • Query and header parameters become rows in the request's Params / Headers table
  • Request bodies with JSON content produce a Raw body populated with an example generated from the schema
  • Security schemes with type: http (Bearer/Basic), apiKey, and oauth2 are converted to the corresponding Auth mode

Unsupported or partially supported:

  • swagger: "2.0" documents are rejected. Convert the spec to OpenAPI 3 first.
  • $ref references inside parameters and requestBodies are resolved; deeper references inside schema may not be.
  • Discriminated unions, oneOf, and allOf in JSON schemas are not always handled; the importer falls back to a placeholder.
  • Webhooks, callbacks, and links are ignored.
  • Servers with variables are not expanded; servers[0].url is used as-is.

How to import

  1. Click Import in the top bar. The import dialog opens.
  2. The OpenAPI tab is the default. Either:
    • Paste the spec source into the textarea, or
    • Click Choose file and pick a .json, .yaml, or .yml file.
  3. The dialog shows the parsed spec. A short status line under the textarea confirms "Imported N requests in M folders" after you click Import API.

After import:

  • A new collection appears in the sidebar with the spec's info.title as its name.
  • One folder per first tag is created at the collection root.
  • One request per operation is created in the appropriate folder.
  • The active environment gains a baseUrl variable. If you already have a baseUrl, the new value replaces it. Other variables are not touched.
  • Imported requests use {{baseUrl}} in their URLs and {{token}} / {{username}} / {{password}} / {{apiKey}} placeholders in auth fields where appropriate. Define these in the environment to make the requests work.

What the importer does to JSON examples

If the spec has a requestBody.content."application/json".example, that exact value is used. Otherwise, the importer looks at examples.<name>.value and uses the first one. If neither is present, it walks the schema and generates a placeholder object with default values:

  • Strings default to ""
  • Numbers default to 0
  • Booleans default to false
  • Arrays default to a one-element array
  • Objects default to a one-level map of all properties

This placeholder is what you see in the Body tab. Replace it with your own data.

Common pitfalls

  • Only OpenAPI 3.x documents are supported — your spec is Swagger 2 or a hand-rolled JSON. Convert with swagger2openapi or rewrite.
  • Path parameter turned into a literal {{id}} — the importer converts {id} to {{id}} so the request stays parameterized. Make sure your environment has an id variable (or replace it with a literal before saving).
  • baseUrl already exists and got overwritten — the importer overwrites the existing baseUrl value but not the rest of the environment. If you have a different baseUrl in another environment, it is unaffected.
  • No requests were imported — the spec has no operations. Check that paths is present and at least one method is defined.
  • Tags are missing — operations without a tag are placed in a folder named Default.

After importing

Once a collection is imported, treat it like any other:

  • Open each request, set up auth in the environment, and send a smoke test.
  • Drag requests into a more thoughtful folder structure.
  • Save the collection's .rewind archive as a starting point for new projects.

What's next?

Released under the MIT License.