Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .changeset/swift-meteors-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@asyncapi/cli': major
---

Removal of postman -> asyncapi conversion functionality

## ⚠ BREAKING CHANGES

Remove postman conversion utilities due to unmaintained dependencies and compatibility issues.

**Why this change?**
- The `postman2openapi` dependency causes multiple issues due to its WASM involvement
- WASM file loading causes browser compatibility issues after webpack updates
- Alternative libraries like `postman-to-openapi` did not provide adequate functionality
- The underlying dependencies are unmaintained and pose long-term maintenance risks

**Impact:**
- The `convert` command no longer supports postman format conversion
- Users relying on postman conversion will need to find alternative solutions

**Future:**
We can consider re-adding this feature after community discussion and establishing a sustainable maintenance plan with actively maintained dependencies.

Related: https://github.com/asyncapi/converter-js/pull/311
2 changes: 1 addition & 1 deletion assets/create-template/templates/default/asyncapi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Temperature Service
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion assets/examples/default-example.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"asyncapi": "3.0.0",
"asyncapi": "3.1.0",
"info": {
"title": "Account Service",
"version": "1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion assets/examples/default-example.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Account Service
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion docs/debugging-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ NODE_ENV=development DEBUG=* node ./lib/apps/api/server.js
# Validate endpoint
curl -X POST http://localhost:3000/v1/validate \
-H "Content-Type: application/json" \
-d '{"asyncapi": "asyncapi: 3.0.0\ninfo:\n title: Test\n version: 1.0.0\nchannels: {}"}'
-d '{"asyncapi": "asyncapi: 3.1.0\ninfo:\n title: Test\n version: 1.0.0\nchannels: {}"}'

# Parse endpoint
curl -X POST http://localhost:3000/v1/parse \
Expand Down
98 changes: 52 additions & 46 deletions docs/usage.md

Large diffs are not rendered by default.

14 changes: 3 additions & 11 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ paths:

/convert:
post:
summary: Convert the given AsyncAPI/OpenAPI/Postman Collection document to AsyncAPI document with the specified version.
summary: Convert the given AsyncAPI/OpenAPI document to AsyncAPI document with the specified version.
operationId: convert
tags:
- convert
Expand Down Expand Up @@ -351,6 +351,7 @@ components:
- $ref: https://raw.githubusercontent.com/asyncapi/spec-json-schemas/master/schemas/2.5.0.json
- $ref: https://raw.githubusercontent.com/asyncapi/spec-json-schemas/master/schemas/2.6.0.json
- $ref: https://raw.githubusercontent.com/asyncapi/spec-json-schemas/master/schemas/3.0.0.json
- $ref: https://raw.githubusercontent.com/asyncapi/spec-json-schemas/master/schemas/3.1.0.json
AsyncAPIDocuments:
type: array
description: AsyncAPI documents in JSON or YAML.
Expand All @@ -363,14 +364,6 @@ components:
oneOf:
- type: string # can be in YAML format
- $ref: https://spec.openapis.org/oas/3.0/schema/2024-10-18
PostmanCollectionDocument:
type: string
description: Postman Collection document in JSON or YAML.
oneOf:
- type: string # can be in YAML format
- $ref: https://schema.getpostman.com/json/collection/v2.1.0/collection.json
- $ref: https://schema.getpostman.com/json/collection/v2.0.0/collection.json
- $ref: https://schema.getpostman.com/json/collection/v1.0.0/collection.json
SpecVersions:
type: string
description: Valid specification versions for the AsyncAPI document.
Expand All @@ -384,6 +377,7 @@ components:
- '2.5.0'
- '2.6.0'
- '3.0.0'
- '3.1.0'
- 'latest'

ValidateRequest:
Expand Down Expand Up @@ -485,7 +479,6 @@ components:
oneOf:
- $ref: '#/components/schemas/AsyncAPIDocument'
- $ref: '#/components/schemas/OpenAPIDocument'
- $ref: '#/components/schemas/PostmanCollectionDocument'
target-version:
description: The version of the AsyncAPI document to be converted to (only applicable for AsyncAPI documents).
$ref: '#/components/schemas/SpecVersions'
Expand All @@ -502,7 +495,6 @@ components:
enum:
- asyncapi
- openapi
- postman-collection
ConvertResponse:
type: object
properties:
Expand Down
121 changes: 41 additions & 80 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
"dependencies": {
"@asyncapi/avro-schema-parser": "^3.0.24",
"@asyncapi/bundler": "^0.6.4",
"@asyncapi/converter": "^1.7.0",
"@asyncapi/converter": "^2.0.1",
"@asyncapi/diff": "^0.5.0",
"@asyncapi/generator": "^3.1.1",
"@asyncapi/modelina-cli": "^5.10.1",
"@asyncapi/openapi-schema-parser": "^3.0.24",
"@asyncapi/optimizer": "^1.0.4",
"@asyncapi/parser": "^3.4.0",
"@asyncapi/parser": "^3.6.0",
"@asyncapi/problem": "^1.0.0",
"@asyncapi/protobuf-schema-parser": "^3.6.0",
"@asyncapi/raml-dt-schema-parser": "^4.0.24",
"@asyncapi/studio": "^1.1.0",
"@asyncapi/studio": "^1.2.0",
"@clack/prompts": "^0.11.0",
"@oclif/core": "^4.8.0",
"@oclif/plugin-autocomplete": "^3.2.39",
Expand Down
4 changes: 2 additions & 2 deletions src/apps/cli/commands/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const TARGET_VERSION_FLAG = 'target-version';

export default class Convert extends Command {
static description =
'Convert asyncapi documents older to newer versions or OpenAPI/postman-collection documents to AsyncAPI';
'Convert asyncapi documents older to newer versions or OpenAPI documents to AsyncAPI';
private conversionService = new ConversionService();
static flags = {
...convertFlags(latestVersion),
Expand Down Expand Up @@ -44,7 +44,7 @@ export default class Convert extends Command {
this.specFile = await load(filePath);
this.metricsMetadata.to_version = targetVersion;
const conversionOptions = {
format: flags.format as 'asyncapi' | 'openapi' | 'postman-collection',
format: flags.format as 'asyncapi' | 'openapi',
[TARGET_VERSION_FLAG]: (targetVersion ||
latestVersion) as AsyncAPIConvertVersion,
perspective: flags['perspective'] as 'client' | 'server',
Expand Down
Loading
Loading