Skip to content

feat: add structured JSON output and categorized exit codes - #2306

Merged
Shurtu-gal merged 8 commits into
asyncapi:masterfrom
neoandmatrix:logging-codes
Nov 7, 2026
Merged

Shurtu-gal merged 8 commits into
asyncapi:masterfrom
neoandmatrix:logging-codes

Conversation

@neoandmatrix

@neoandmatrix neoandmatrix commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds a global --json flag and a stable exit-code scheme to every CLI command. This preserves the current human format output.
Below are the list of range used for different outputs:-

Range Category
10–19 Validation
20–29 Generation
30–39 File operations
40–49 Network
50–59 CLI input / configuration
60–69 Server / runtime
90–92 Dependency / internal
127, 130 Unknown command, interrupted (existing convention)

More details in the file docs/codes.md .

@changeset-bot

changeset-bot Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 69ebc0c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@asyncapi/cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@neoandmatrix
neoandmatrix marked this pull request as ready for review September 28, 2026 07:47
@neoandmatrix
neoandmatrix marked this pull request as draft September 28, 2026 07:52
Signed-off-by: Tushar Anand <[email protected]>
@neoandmatrix
neoandmatrix marked this pull request as ready for review October 4, 2026 15:02
Signed-off-by: Tushar Anand <[email protected]>
@neoandmatrix
neoandmatrix marked this pull request as draft October 4, 2026 15:21
@neoandmatrix neoandmatrix changed the title add structured JSON output and categorized exit codes feat: add structured JSON output and categorized exit codes Oct 4, 2026
@neoandmatrix
neoandmatrix marked this pull request as ready for review October 4, 2026 17:59
@sonarqubecloud

sonarqubecloud Bot commented Oct 4, 2026

Copy link
Copy Markdown

@neoandmatrix

Copy link
Copy Markdown
Contributor Author

Just a small thing i think docs/structured-output.md can be completely removed as previous file docs/codes.md have details but I am not sure that more will be required or not.
Rest ready to be reviewed form my side.

@Shurtu-gal

Copy link
Copy Markdown
Collaborator

@neoandmatrix sorry this went out of my sight. Could you resolve conflicts once and let me know? I will review this.

@neoandmatrix

Copy link
Copy Markdown
Contributor Author

@neoandmatrix sorry this went out of my sight. Could you resolve conflicts once and let me know? I will review this.

Sure.

@neoandmatrix

Copy link
Copy Markdown
Contributor Author

@Shurtu-gal I have updated the PR and resolved the merge fixes. Please have a look.

@sonarqubecloud

sonarqubecloud Bot commented Nov 7, 2026

Copy link
Copy Markdown

@Shurtu-gal Shurtu-gal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep looks better now to have unified logging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants