Each converter is used in a complete, runnable script in its guide: Postman, Insomnia, OpenAPI, and WSDL. After converting, call writeCollection from @usebruno/io to save the collection as OpenCollection YAML.
writeCollection
Writes a Bruno collection object to disk as an OpenCollection YAML directory that Bruno can open.
import { writeCollection } from '@usebruno/io';await writeCollection(collection, outputDir);
Parameters
object
required
The Bruno collection object returned by a @usebruno/converters function.
string
required
The folder to write. Created if it does not exist. Contains opencollection.yml, folder.yml per folder, one .yml per request (examples included), and environments/<name>.yml.
Returns
Promise
Resolves when the collection has been written.
postmanToBruno
Converts a Postman collection to a Bruno collection.
postmanToBruno is async and returns a Promise. await the result, or the value you get back is a pending Promise rather than the collection.
The specification as a parsed object, or as a raw JSON or YAML string.
object
Show properties
string
default:"tags"
How requests are grouped into folders: "tags" groups by operation tag, "path" groups by URL path.
string
default:"summary"
How requests are named: "summary" (default), "operationId", "description", or "path". If the selected field is missing, Bruno falls back through summary, operationId, description, then method and path.
string
default:"request"
Where to place auth from the spec: "request" (default) writes auth on each request, "collection" sets the scheme on the collection and lets matching requests inherit it. Operations with a different scheme keep their own auth.
Returns
object
The Bruno collection.
wsdlToBruno
Converts a WSDL file to a Bruno collection of SOAP requests.
wsdlToBruno is async and returns a Promise. await the result, or the value you get back is a pending Promise rather than the collection.