Powerful IDE for API-first design, documentation and development.

Start my Free Trial

If you have an existing Swagger Spec in YAML format, you can import it into RepreZen API Studio for editing, testing and code generation. 


Since API Studio is an Eclipse-based environment, the Swagger spec has to be imported to a RepreZen API Project, in the active Workspace.  Follow the steps below to see how this works.


Note:These instructions are for importing a Swagger spec in YAML format.  If your Swagger files are in JSON format, please see Working with Swagger-OpenAPI in JSON Format.


Creating a RepreZen API Project

You'll find commands to create a project in several places:


  • In the Dashboard (Welcome Tab)


  • In the Dashboard (Active Tab)

  • In the Toolbar


  • In the File menu

This will show the New Project Wizard.  Name your project, and click Finish.


Showing the Project Explorer

Click the Restore button to show the Project Explorer. 


You'll see the default project structure, including the models folder.  This is the preferred location for Swagger and RAPID-ML API specification files. 


Importing the Swagger Spec

To import a Swagger Spec, you can drag-and-drop, copy-and-paste, or use the File Import command to get the Swagger JSON spec into the models folder of the project.

Importing with Drag-and-Drop

 

Drag the file you want to import into the models folder of the project inside API studio, or the underlying models folder in the filesystem.

 

If you chose to copy the file using the filesystem, you need to refresh the folder in API Studio.  Do this by selecting the folder in API Studio and pressing the refresh key (F5 on Windows), or right-clicking on the project in Project Explorer, and clicking the Refresh command.

 

If you chose to copy the file by dropping it into the folder inside API Studio, you may be asked whether you want to copy or link the file. Choose an option based on your needs. Copy is usually a safe choice.


Importing with Copy and Paste

  1. Use the toolbar button, menu command or dashboard link to create a new Swagger spec in the models folder of your project.  Since you'll be pasting an existing Swagger spec into the editor, you can choose "No Content" as the initial content.

  2. Paste the content into the editor.

Importing with the File Import Command

  1. In Project Explorer, select the models folder in the project you want to use.

  2. From the File menu, choose Import...

  3. Open the General folder and choose File System.

  4. Navigate to the folder containing the Swagger YAML file you want to import, choose the file, and click Finish.


Once the file is imported to the models folder, you can open it from the Project explorer for editing, testing and code generation.