Skip to content

Commit 7580cee

Browse files
asyncapi-botasyncapi-botShurtu-gal
authored
feat!: remove postman-collection conversion functionality (#2003)
Co-authored-by: asyncapi-bot <info@asyncapi.io> Co-authored-by: Shurtu-gal <ashishpadhy1729@gmail.com>
1 parent 6282a9a commit 7580cee

28 files changed

+164
-318
lines changed

.changeset/swift-meteors-sip.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@asyncapi/cli': major
3+
---
4+
5+
Removal of postman -> asyncapi conversion functionality
6+
7+
## ⚠ BREAKING CHANGES
8+
9+
Remove postman conversion utilities due to unmaintained dependencies and compatibility issues.
10+
11+
**Why this change?**
12+
- The `postman2openapi` dependency causes multiple issues due to its WASM involvement
13+
- WASM file loading causes browser compatibility issues after webpack updates
14+
- Alternative libraries like `postman-to-openapi` did not provide adequate functionality
15+
- The underlying dependencies are unmaintained and pose long-term maintenance risks
16+
17+
**Impact:**
18+
- The `convert` command no longer supports postman format conversion
19+
- Users relying on postman conversion will need to find alternative solutions
20+
21+
**Future:**
22+
We can consider re-adding this feature after community discussion and establishing a sustainable maintenance plan with actively maintained dependencies.
23+
24+
Related: https://github.com/asyncapi/converter-js/pull/311

assets/create-template/templates/default/asyncapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
asyncapi: 3.0.0
1+
asyncapi: 3.1.0
22
info:
33
title: Temperature Service
44
version: 1.0.0

assets/examples/default-example.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"asyncapi": "3.0.0",
2+
"asyncapi": "3.1.0",
33
"info": {
44
"title": "Account Service",
55
"version": "1.0.0",

assets/examples/default-example.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
asyncapi: 3.0.0
1+
asyncapi: 3.1.0
22
info:
33
title: Account Service
44
version: 1.0.0

docs/debugging-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ NODE_ENV=development DEBUG=* node ./lib/apps/api/server.js
189189
# Validate endpoint
190190
curl -X POST http://localhost:3000/v1/validate \
191191
-H "Content-Type: application/json" \
192-
-d '{"asyncapi": "asyncapi: 3.0.0\ninfo:\n title: Test\n version: 1.0.0\nchannels: {}"}'
192+
-d '{"asyncapi": "asyncapi: 3.1.0\ninfo:\n title: Test\n version: 1.0.0\nchannels: {}"}'
193193

194194
# Parse endpoint
195195
curl -X POST http://localhost:3000/v1/parse \

docs/usage.md

Lines changed: 52 additions & 46 deletions
Large diffs are not rendered by default.

openapi.yaml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ paths:
167167

168168
/convert:
169169
post:
170-
summary: Convert the given AsyncAPI/OpenAPI/Postman Collection document to AsyncAPI document with the specified version.
170+
summary: Convert the given AsyncAPI/OpenAPI document to AsyncAPI document with the specified version.
171171
operationId: convert
172172
tags:
173173
- convert
@@ -351,6 +351,7 @@ components:
351351
- $ref: https://raw.githubusercontent.com/asyncapi/spec-json-schemas/master/schemas/2.5.0.json
352352
- $ref: https://raw.githubusercontent.com/asyncapi/spec-json-schemas/master/schemas/2.6.0.json
353353
- $ref: https://raw.githubusercontent.com/asyncapi/spec-json-schemas/master/schemas/3.0.0.json
354+
- $ref: https://raw.githubusercontent.com/asyncapi/spec-json-schemas/master/schemas/3.1.0.json
354355
AsyncAPIDocuments:
355356
type: array
356357
description: AsyncAPI documents in JSON or YAML.
@@ -363,14 +364,6 @@ components:
363364
oneOf:
364365
- type: string # can be in YAML format
365366
- $ref: https://spec.openapis.org/oas/3.0/schema/2024-10-18
366-
PostmanCollectionDocument:
367-
type: string
368-
description: Postman Collection document in JSON or YAML.
369-
oneOf:
370-
- type: string # can be in YAML format
371-
- $ref: https://schema.getpostman.com/json/collection/v2.1.0/collection.json
372-
- $ref: https://schema.getpostman.com/json/collection/v2.0.0/collection.json
373-
- $ref: https://schema.getpostman.com/json/collection/v1.0.0/collection.json
374367
SpecVersions:
375368
type: string
376369
description: Valid specification versions for the AsyncAPI document.
@@ -384,6 +377,7 @@ components:
384377
- '2.5.0'
385378
- '2.6.0'
386379
- '3.0.0'
380+
- '3.1.0'
387381
- 'latest'
388382

389383
ValidateRequest:
@@ -485,7 +479,6 @@ components:
485479
oneOf:
486480
- $ref: '#/components/schemas/AsyncAPIDocument'
487481
- $ref: '#/components/schemas/OpenAPIDocument'
488-
- $ref: '#/components/schemas/PostmanCollectionDocument'
489482
target-version:
490483
description: The version of the AsyncAPI document to be converted to (only applicable for AsyncAPI documents).
491484
$ref: '#/components/schemas/SpecVersions'
@@ -502,7 +495,6 @@ components:
502495
enum:
503496
- asyncapi
504497
- openapi
505-
- postman-collection
506498
ConvertResponse:
507499
type: object
508500
properties:

package-lock.json

Lines changed: 41 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
"dependencies": {
1515
"@asyncapi/avro-schema-parser": "^3.0.24",
1616
"@asyncapi/bundler": "^0.6.4",
17-
"@asyncapi/converter": "^1.7.0",
17+
"@asyncapi/converter": "^2.0.1",
1818
"@asyncapi/diff": "^0.5.0",
1919
"@asyncapi/generator": "^3.1.1",
2020
"@asyncapi/modelina-cli": "^5.10.1",
2121
"@asyncapi/openapi-schema-parser": "^3.0.24",
2222
"@asyncapi/optimizer": "^1.0.4",
23-
"@asyncapi/parser": "^3.4.0",
23+
"@asyncapi/parser": "^3.6.0",
2424
"@asyncapi/problem": "^1.0.0",
2525
"@asyncapi/protobuf-schema-parser": "^3.6.0",
2626
"@asyncapi/raml-dt-schema-parser": "^4.0.24",
27-
"@asyncapi/studio": "^1.1.0",
27+
"@asyncapi/studio": "^1.2.0",
2828
"@clack/prompts": "^0.11.0",
2929
"@oclif/core": "^4.8.0",
3030
"@oclif/plugin-autocomplete": "^3.2.39",

src/apps/cli/commands/convert.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const TARGET_VERSION_FLAG = 'target-version';
1616

1717
export default class Convert extends Command {
1818
static description =
19-
'Convert asyncapi documents older to newer versions or OpenAPI/postman-collection documents to AsyncAPI';
19+
'Convert asyncapi documents older to newer versions or OpenAPI documents to AsyncAPI';
2020
private conversionService = new ConversionService();
2121
static flags = {
2222
...convertFlags(latestVersion),
@@ -44,7 +44,7 @@ export default class Convert extends Command {
4444
this.specFile = await load(filePath);
4545
this.metricsMetadata.to_version = targetVersion;
4646
const conversionOptions = {
47-
format: flags.format as 'asyncapi' | 'openapi' | 'postman-collection',
47+
format: flags.format as 'asyncapi' | 'openapi',
4848
[TARGET_VERSION_FLAG]: (targetVersion ||
4949
latestVersion) as AsyncAPIConvertVersion,
5050
perspective: flags['perspective'] as 'client' | 'server',

0 commit comments

Comments
 (0)