createSpec
Generate API specifications in Postman's Spec Hub for OpenAPI 3.0 or AsyncAPI 2.0 formats, supporting both single and multi-file structures.
Instructions
Creates an API specification in Postman's Spec Hub. Specifications can be single or multi-file.
Note:
Postman supports OpenAPI 3.0 and AsyncAPI 2.0 specifications.
If the file path contains a `/` (forward slash) character, then a folder is created. For example, if the path is the `components/schemas.json` value, then a `components` folder is created with the `schemas.json` file inside.
Multi-file specifications can only have one root file.
Files cannot exceed a maximum of 10 MB in size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | The workspace's ID. | |
| name | Yes | The specification's name. | |
| type | Yes | The specification's type. | |
| files | Yes | A list of the specification's files and their contents. |