Skip to content

feat: treat experimental apiKind identically to no-BWC in compatibility scope#88

Open
makeev-pavel wants to merge 1 commit into
developfrom
feature/experimental-apikind
Open

feat: treat experimental apiKind identically to no-BWC in compatibility scope#88
makeev-pavel wants to merge 1 commit into
developfrom
feature/experimental-apikind

Conversation

@makeev-pavel
Copy link
Copy Markdown
Collaborator

Summary

Treat x-api-kind: experimental identically to x-api-kind: no-BWC when classifying API changes. Operations and channels marked as experimental now produce risky (instead of breaking) changes in both REST and AsyncAPI compatibility scopes.

Changes

Source code (3 files, ~30 lines):

  • src/consts.ts — added isNoBwcOrExperimental helper
  • src/components/compare/rest.bwc.validation.ts — replaced direct === NO_BWC checks with isNoBwcOrExperimental(), added predicate-based checkAllMethodsMatchApiKind to handle mixed apiKind within a single pathItem (e.g. GET=no-BWC, POST=experimental)
  • src/components/compare/async.bwc.validation.ts — updated toApiCompatibilityKind to treat experimental the same as no-BWC

Tests (3 files, +133 tests):

  • test/apiKinds.test.ts — experimental-only (labels, info, operation, remove), mixed no-BWC/experimental, mixed apiKind within pathItem
  • test/asyncapi-build-apikind.test.tscalculateAsyncApiKind unit tests for experimental and mixed
  • test/asyncapi-changelog-apikind.test.ts — full experimental coverage across all scopes (root, channel, operation), all change types (remove operation/channel/message, modify payload)

Fixtures (22 YAML files):

  • 12 experimental-only fixtures (info/operation/remove levels)
  • 8 mixed no-BWC↔experimental fixtures
  • 2 mixed apiKind within same pathItem fixture

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FE] apiKind=experimental must have the same influence on changes categoryzation as apiKind=no-bwc

1 participant