You can generate an OpenAPI 3.0 specification from a collection in Spec Hub. Generated specifications enable you to complete the API lifecycle by integrating your API with downstream systems, such as API gateways or security scanners. You can also keep the specification in sync with its collection.
Add types to parameters and headers and body data that describe your APIs. This way Postman can generate a complete OpenAPI 3.0 specification in Spec Hub. Learn more about types in collections.
You can generate an OpenAPI 3.0 specification from your collection. Postman automatically creates a specification with paths, components, and more based on your collection. The specification will also have types associated with parameters, headers, and body data if types are defined in the collection.
To generate a specification from a collection, do the following:
To view the generated specification, open the collection’s overview, and then click the specification’s name under Specification. You can also click Specs in the sidebar and select the specification.
Your Postman plan gives you a limited number of specifications in your team’s internal workspaces. Learn more about resource usage in Postman.
You can only generate one API specification from the same collection. To generate a new specification from the collection, delete the generated specification from Spec Hub.
Syncing isn’t available for collections generated from AsyncAPI specifications.
When you generate an OpenAPI 3.0 specification from a collection, Postman creates a specification that matches the requests in the collection. If you update the collection or specification, such as by adding a new request, Postman alerts you that the generated specification isn’t in sync with the collection.
Postman doesn’t delete elements from a collection when you sync it with the specification. For example, if you change the name of an existing path in your specification, Postman creates a new path in your collection when it’s updated. The existing path still exists with the previous name in your generated collection, and you can choose to delete the path.
Syncing collections to multi-file OpenAPI specifications isn’t supported.
To sync changes made in a generated collection to your OpenAPI specification, do the following:
![]()
Changes to vendor extensions, operations, and requests made directly to the specification won’t be overwritten by the collection.
To sync changes made in an OpenAPI specification to a generated collection, do the following:
Click Specs in the sidebar and select an OpenAPI 3.0 specification.
An orange dot on the arrow next to
Generate Collection indicates one or more collections aren’t in sync with the specification.
Click the arrow next to
Generate Collection.
Click Update next to the generated collection you want to update.
Last modified: 2025/10/15