Class PostmanImporter
Converts a Postman Collection v2.1 JSON file into one or more CressFlow objects.
Each request becomes a separate flow by default (singleFlow = false),
or all requests are combined into a single multi-step flow when singleFlow = true.
public sealed class PostmanImporter
- Inheritance
-
PostmanImporter
- Inherited Members
Remarks
Supports:
- HTTP methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
- URL from
request.url.raw(preferred) or reconstructed from host/path - Headers →
with.headers.*key/value pairs - Raw body →
with.body - Postman variable syntax
{{varName}}is preserved verbatim - Folder hierarchy → flow
tags
- Pre-request scripts or test scripts (Postman JS hooks) — emitted as TODO comment steps
- Body modes other than "raw" — emitted as TODO comment steps
Methods
Import(string, bool)
Parse a Postman Collection v2.1 JSON string and return one CressFlow per request.
public IReadOnlyList<CressFlow> Import(string collectionJson, bool singleFlow = false)
Parameters
collectionJsonstringFull JSON content of the Postman collection.
singleFlowboolWhen true, all requests are combined into one flow with sequential steps. When false (default), one flow is produced per request.
Returns
- IReadOnlyList<CressFlow>
A list of CressFlow objects ready for YAML serialization.