{"record":{"id":"84d7d917f7a71372","repo":"usebruno/bruno","slug":"unsupported-postman-schema-version-only-postman-c","errorCode":null,"errorMessage":"Unsupported Postman schema version. Only Postman Collection v2.0 and v2.1 are supported.","messagePattern":"Unsupported Postman schema version\\. Only Postman Collection v2\\.0 and v2\\.1 are supported\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-converters/src/postman/postman-to-bruno.js","lineNumber":1178,"sourceCode":"const parsePostmanCollection = async (collection, { useWorkers = false, preserveScripts = false }) => {\n  try {\n    // Newer Postman exports wrap the collection in a { collection: { ... } } envelope\n    const parsedCollection = collection.collection?.info ? collection.collection : collection;\n\n    let schema = get(parsedCollection, 'info.schema');\n\n    let v2Schemas = [\n      'https://schema.getpostman.com/json/collection/v2.0.0/collection.json',\n      'https://schema.getpostman.com/json/collection/v2.1.0/collection.json',\n      'https://schema.postman.com/json/collection/v2.0.0/collection.json',\n      'https://schema.postman.com/json/collection/v2.1.0/collection.json'\n    ];\n\n    if (v2Schemas.includes(schema)) {\n      return await importPostmanV2Collection(parsedCollection, { useWorkers, preserveScripts });\n    }\n\n    throw new Error('Unsupported Postman schema version. Only Postman Collection v2.0 and v2.1 are supported.');\n  } catch (err) {\n    console.log(err);\n    if (err instanceof Error) {\n      throw err;\n    }\n\n    throw new Error('Invalid Postman collection format. Please check your JSON file.');\n  }\n};\n\nconst postmanToBruno = async (postmanCollection, { useWorkers = false, preserveScripts = false } = {}) => {\n  try {\n    // Resolve the actual collection envelope (Postman wraps newer exports\n    // in a `{ collection: {...} }` shell) so the raw scan sees real events.\n    const rawCollectionForScan = postmanCollection?.collection?.info\n      ? postmanCollection.collection\n      : postmanCollection;\n    const rawPackages = collectPackagesFromPostmanCollection(rawCollectionForScan);","sourceCodeStart":1160,"sourceCodeEnd":1196,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-converters/src/postman/postman-to-bruno.js#L1160-L1196","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Re-export the collection from Postman choosing the 'Collection v2.1' format.","If the schema URL is merely missing, set info.schema to 'https://schema.getpostman.com/json/collection/v2.1.0/collection.json' manually.","For v1 collections, first convert them to v2.1 using Postman's built-in upgrade or the postman-collection-transformer tool."],"exampleFix":"// before — info.schema missing or 'v1'\n{ info: { name: 'X' /* no schema */ }, item: [...] }\n\n// after\n{ info: { name: 'X', schema: 'https://schema.getpostman.com/json/collection/v2.1.0/collection.json' }, item: [...] }","handlingStrategy":"validation","validationCode":"const SUPPORTED = [\n  'https://schema.getpostman.com/json/collection/v2.0.0/collection.json',\n  'https://schema.getpostman.com/json/collection/v2.1.0/collection.json',\n  'https://schema.postman.com/json/collection/v2.0.0/collection.json',\n  'https://schema.postman.com/json/collection/v2.1.0/collection.json'\n];\nconst inner = c.collection?.info ? c.collection : c;\nconst schema = inner?.info?.schema;\nif (!SUPPORTED.includes(schema)) {\n  inner.info = inner.info || {};\n  inner.info.schema = SUPPORTED[1]; // upgrade marker, or reject early\n}","typeGuard":"const isPostmanV2 = (c) => {\n  const inner = c?.collection?.info ? c.collection : c;\n  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);\n};","tryCatchPattern":"try {\n  return await postmanToBruno(coll);\n} catch (e) {\n  if (/Unsupported Postman schema version/.test(e.message)) {\n    throw new Error('Re-export the collection as Postman v2.0 or v2.1.');\n  }\n  throw e;\n}","preventionTips":["Always export Postman collections in v2.1 format.","Before import, assert info.schema is one of the four supported URLs.","For legacy v1 collections, convert with postman-collection-transformer first."],"tags":["postman","schema-version","import","bruno-converters","version-mismatch"],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}