usebruno/bruno · error · Error

Unsupported Postman schema version. Only Postman Collection

Error message

Unsupported Postman schema version. Only Postman Collection v2.0 and v2.1 are supported.

What it means

Thrown by parsePostmanCollection when the collection's info.schema URL is not one of the four recognized Postman v2.0/v2.1 schema URLs. Bruno's importer only supports Postman Collection v2.0 and v2.1; v1 collections, schema-less exports, or collections with a custom/altered schema URL are rejected. The collection envelope ({ collection: {...} }) is unwrapped first, so info.schema is read from the inner object.

Source

Thrown at packages/bruno-converters/src/postman/postman-to-bruno.js:1178

const parsePostmanCollection = async (collection, { useWorkers = false, preserveScripts = false }) => {
  try {
    // Newer Postman exports wrap the collection in a { collection: { ... } } envelope
    const parsedCollection = collection.collection?.info ? collection.collection : collection;

    let schema = get(parsedCollection, 'info.schema');

    let v2Schemas = [
      'https://schema.getpostman.com/json/collection/v2.0.0/collection.json',
      'https://schema.getpostman.com/json/collection/v2.1.0/collection.json',
      'https://schema.postman.com/json/collection/v2.0.0/collection.json',
      'https://schema.postman.com/json/collection/v2.1.0/collection.json'
    ];

    if (v2Schemas.includes(schema)) {
      return await importPostmanV2Collection(parsedCollection, { useWorkers, preserveScripts });
    }

    throw new Error('Unsupported Postman schema version. Only Postman Collection v2.0 and v2.1 are supported.');
  } catch (err) {
    console.log(err);
    if (err instanceof Error) {
      throw err;
    }

    throw new Error('Invalid Postman collection format. Please check your JSON file.');
  }
};

const postmanToBruno = async (postmanCollection, { useWorkers = false, preserveScripts = false } = {}) => {
  try {
    // Resolve the actual collection envelope (Postman wraps newer exports
    // in a `{ collection: {...} }` shell) so the raw scan sees real events.
    const rawCollectionForScan = postmanCollection?.collection?.info
      ? postmanCollection.collection
      : postmanCollection;
    const rawPackages = collectPackagesFromPostmanCollection(rawCollectionForScan);

View on GitHub (pinned to 9bdd81c7bd)

Solutions

  1. Re-export the collection from Postman choosing the 'Collection v2.1' format.
  2. If the schema URL is merely missing, set info.schema to 'https://schema.getpostman.com/json/collection/v2.1.0/collection.json' manually.
  3. For v1 collections, first convert them to v2.1 using Postman's built-in upgrade or the postman-collection-transformer tool.

Example fix

// before — info.schema missing or 'v1'
{ info: { name: 'X' /* no schema */ }, item: [...] }

// after
{ info: { name: 'X', schema: 'https://schema.getpostman.com/json/collection/v2.1.0/collection.json' }, item: [...] }
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED = [
  'https://schema.getpostman.com/json/collection/v2.0.0/collection.json',
  'https://schema.getpostman.com/json/collection/v2.1.0/collection.json',
  'https://schema.postman.com/json/collection/v2.0.0/collection.json',
  'https://schema.postman.com/json/collection/v2.1.0/collection.json'
];
const inner = c.collection?.info ? c.collection : c;
const schema = inner?.info?.schema;
if (!SUPPORTED.includes(schema)) {
  inner.info = inner.info || {};
  inner.info.schema = SUPPORTED[1]; // upgrade marker, or reject early
}

Type guard

const isPostmanV2 = (c) => {
  const inner = c?.collection?.info ? c.collection : c;
  return ['https://schema.getpostman.com/json/collection/v2.0.0/collection.json','https://schema.getpostman.com/json/collection/v2.1.0/collection.json','https://schema.postman.com/json/collection/v2.0.0/collection.json','https://schema.postman.com/json/collection/v2.1.0/collection.json'].includes(inner?.info?.schema);
};

Try / catch

try {
  return await postmanToBruno(coll);
} catch (e) {
  if (/Unsupported Postman schema version/.test(e.message)) {
    throw new Error('Re-export the collection as Postman v2.0 or v2.1.');
  }
  throw e;
}

Prevention

When it happens

Trigger: Importing a Postman v1 collection; importing a collection whose info.schema was stripped or rewritten; importing a collection exported by a non-standard tool that omits the schema URL; the info block is missing entirely so `get(parsedCollection, 'info.schema')` returns undefined.

Common situations: Old Postman exports predating v2.0; collections exported from Insomnia/other tools in a Postman-like shape but without the canonical schema URL; manually edited JSON where info.schema was deleted.

Related errors


AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13). Data as JSON: /api/errors/84d7d917f7a71372. Report an issue: GitHub.