Skip to Content
API DesignImport or Migrate

Importing API Spec Files

When adding a new API Spec to your API Repository, instead of creating a blank one, you can import an existing API Spec from your local PC.

Click the plus icon at the top of the file tree to open the create-file dialog. Choose the OpenAPI Spec card, then import openAPI spec. The file must be in JSON format (“.json” extension) or YAML format (“.yaml” or “.yml” extension). A Swagger 2.0 file is also accepted; support for this file format remains available after the removal of the Swagger UI viewer.

Import API spec files

By specifying a pathname, the API spec will be uploaded to the specific location with the name you specified.

The same dialog has six file-type cards: OpenAPI Spec, AsyncAPI Spec, GraphQL Schema, JSON Schema Spec, Markdown Document and Navigation.

Import AsyncAPI or GraphQL

  • AsyncAPI Spec imports YAML or JSON with an asyncapi field. AsyncAPI 2.x and 3.x render in the viewer; a new starter uses 3.0.
  • GraphQL Schema imports SDL text. The pathname must end in .graphql or .gql; introspection JSON is not supported.

Both formats open in the code editor and have Diff and Preview tabs. See Supported API Formats for their capabilities.

JSON Schema Spec and Markdown Document can also be created or imported. Navigation creates the apigit.json navigation file.

Import HAR and Convert to OpenAPI Spec

In the same dialog, select import HAR file. We will iterate through all request entries and convert them to API endpoints accordingly. The servers found in the file are listed under Servers:, and only the requests for the servers you keep selected are imported.

This feature is very useful if you’ve already built your APIs and want to document them quickly by recording all API transactions in HAR format and importing them to accelerate your API documentation process.

Import Postman Collection and Convert to OpenAPI Spec

For existing Postman users, select import Postman Collection to convert a collection to a standard OpenAPI spec. Postman collection formats v2.0 and v2.1 are supported.

Import Paths Into an Existing Spec

To add endpoints to a spec you are already editing, click the upload icon in the editor toolbar (tooltip import paths to spec). In the Import paths from a Spec dialog, choose upload openApi spec or upload HAR file, select a file and click Import. The content is merged into the current spec and appears as an uncommitted change.

Migrate a Repository

To bring a whole repository from another Git platform, see Create or Migrate Repository.

Last updated on