convert library
Postman collections (v1, v2.0, v2.1, v3 and the Postman API envelope) to
OpenAPI, and JSON Schema inference from JSON samples. Pure Dart; v3
directories are read by package:postman_collection/io.dart.
Functions
-
inferJsonSchema(
Iterable< Object?> samples) → Map<String, Object?> - JSON Schema (2020-12) describing every sample.
-
isPostmanCollection(
Object? json) → bool -
Whether
jsonis a Postman collection (v1, v2.0, v2.1, or the Postman API{collection: {...}}envelope). -
normalizePostmanCollection(
Object? json) → Map< String, Object?> -
jsonas a v2.1 collection map (envelope unwrapped, v1/v2.0 upgraded). -
postmanCollectionFromV3Files(
Map< String, String> files, {String? name, void onWarning(String message)?}) → Map<String, Object?> - A v3 collection (paths relative to the collection root → YAML text) as a v2.1 collection map.
-
postmanToOpenApi(
Object? collection, {void onWarning(String message)?}) → Map< String, Object?> - OpenAPI 3.1.1 (3.2.0 when a request uses QUERY or a non-3.1 method) for a collection in any JSON version.