With a multi-file API specification in Spec Hub, your specification can span across multiple files and folders, improving its organization and management. Multi-file specifications are supported for OpenAPI 3.0 specifications.
All files in a multi-file specification are considered the full API specification. Each multi-file specification has a root file that's the top-level file in your specification where the root OpenAPI object is defined. The root file hosts the operations defined by the API and it can reference other files in your specification.
When you create a multi-file specification or import a multi-file specification, Postman determines the root file based on the references across the files. Your specification can only have one root file.
Add one or more additional files to an OpenAPI 3.0 specification to turn it into a multi-file specification. Then you can add more files and folders to your specification from the file manager.
To create a multi-file specification, do the following:
Once you've created or imported a multi-file OpenAPI 3.0 specification, you can add more files and folders and even search them by name, all from the file manager. You can also rename and delete your files and folders.
To add more files and folders to your specification, do the following:
Click Specs in the sidebar.
Click a multi-file OpenAPI 3.0 specification in the sidebar.
In the file manager, click Add Files and Folders and then select one of the following:
Next to a folder, you can also click View more actions and then select one of the following:
You can also take the following actions from the file manager:
Your multi-file specification can only have one root file that's used to reference other files in your specification. You can change the root file in your multi-file specification at any time.
To change the root file in a multi-file specification, do the following:
Click Specs in the sidebar.
Click a multi-file OpenAPI 3.0 specification in the sidebar.
Next to a file in the file manager, select View more actions > Mark as Root file.
Click Confirm.
Make sure to update the new root file with the root OpenAPI object and references to other files in your specification. Otherwise, Postman can't parse your specification.
Last modified: 2025/07/14