Skip to content

feat: Build changelog for AsyncAPI specifications#70

Open
makeev-pavel wants to merge 31 commits intodevelopfrom
feature/asyncapi-basic-e2e-changelog
Open

feat: Build changelog for AsyncAPI specifications#70
makeev-pavel wants to merge 31 commits intodevelopfrom
feature/asyncapi-basic-e2e-changelog

Conversation

@makeev-pavel
Copy link
Copy Markdown
Collaborator

No description provided.

@makeev-pavel makeev-pavel requested a review from b41ex as a code owner March 13, 2026 07:05
@makeev-pavel makeev-pavel marked this pull request as draft March 13, 2026 07:06
Copy link
Copy Markdown
Collaborator

@b41ex b41ex left a comment

Choose a reason for hiding this comment

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

As discussed, let's add following group of tests:

BWC scopes

Change deduplication

  • changes in shared entities
  • different scopes
  • in the same specification
  • across different specifications

@b41ex b41ex deleted the branch develop March 18, 2026 09:15
@b41ex b41ex closed this Mar 18, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2026
@b41ex b41ex reopened this Mar 18, 2026
@b41ex b41ex changed the base branch from feature/asyncapi-basic-e2e to develop March 18, 2026 09:19
@github-actions github-actions bot added the enhancement New feature or request label Mar 19, 2026
@makeev-pavel makeev-pavel marked this pull request as ready for review March 19, 2026 13:38
it.each([
// default | before | after | expected
['bwc', 'undefined', 'undefined', undefined],
['bwc', 'undefined', 'bwc', undefined],
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.

undefined as ER for cases where one of the value is undefined and another is bwc (or even worse- both are bwc, but the ER is undefined) looks counter-intuitive to me. I would say that in these cases the function should return bwc.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

discussed separately
#72

it.each([
// default | before | after | expected
['bwc', 'undefined', 'undefined', undefined],
['bwc', 'undefined', 'bwc', undefined],
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.

Ditto regarding ER undefined for cases

  • undefined, bwc
  • bwc, undefined
  • bwc, bwc

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

discussed separately
#72

@@ -25,68 +32,228 @@ describe('AsyncAPI apiKind calculation', () => {
expect(result).toBe(expected)
})
})

describe('Changelog backward compatibility scope function', () => {
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.

Integration tests are missing for the apiKind handling during changelog build.
Integration tests are important here, because final result depends on behavior of both compatibility scope function provided by api-processor and behavior of api-diff.
Review corresponding integration tests for REST at least in these test groups and add analogous tests for Async.
'ApiKind operations section tests'
'Priority operation ApiKind and default ApiKind'
'Remove operations tests'
There is actually less places where we could set api kind in Async compared to REST, so number of tests for Async will be less than number of tests for REST, but cases we need to check are all similar.

Copy link
Copy Markdown
Collaborator Author

@makeev-pavel makeev-pavel Mar 30, 2026

Choose a reason for hiding this comment

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

Added integration tests for AsyncAPI x-api-kind handling in asyncapi-changelog-apikind.test.ts, analogous to the REST tests in apiKinds.test.ts.

Operation-level x-api-kind (9 cases, table-driven via test.each):
All transitions between none, BWC, and no-BWC in prev/curr documents — verifies that no-BWC in either document results in risky classification, and BWC (or default) results in breaking.

Channel-level x-api-kind (9 cases, same table reused):
Same transition matrix applied at channel level.

Operation + Channel priority (4 cases):

  • Fallback: operation without x-api-kind inherits from channel (channel-bwc-operation-none, channel-nobwc-operation-none)
  • Override: operation x-api-kind takes priority over channel (channel-bwc-operation-nobwc, channel-nobwc-operation-bwc)

Remove operation (7 cases):

  • Removed operation with x-api-kind: BWC → breaking
  • Removed operation with x-api-kind: no-BWC → risky
  • Removed operation without x-api-kind → breaking (default BWC)
  • Priority: operation x-api-kind overrides channel on removal (remove-channel-nobwc-operation-bwc, remove-channel-bwc-operation-nobwc)
  • Fallback: removed operation without x-api-kind uses channel (remove-channel-nobwc-operation-none, remove-channel-bwc-operation-none)

Note on "add operation": not covered because adding an operation is classified as non-breaking by api-diff regardless of x-api-kind — same as in REST tests (apiKinds.test.ts).

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FE] Build changelog for AsyncAPI specifications

3 participants