feat: support schema changes classification for AsyncAPI#65
Merged
Conversation
improve toString for diffsMatcher
…pecifica to OpenAPI dialect
AsyncAPI will always have duplicate changes in root scope due to the structure of the specification
src/asyncapi/asyncapi3.bindings.ts
Outdated
| $: allUnclassified, | ||
| '/*': { | ||
| $: allUnclassified, | ||
| '/*': { $: allUnclassified }, |
src/asyncapi/asyncapi3.rules.ts
Outdated
| $: allAnnotation, | ||
| '/headers': { | ||
| $: allAnnotation, | ||
| '/*': { $: allAnnotation }, |
src/asyncapi/asyncapi3.rules.ts
Outdated
| // For send operations: add=non-breaking (can send new types), remove=breaking | ||
| // For receive operations: add=breaking (must handle new types), remove=non-breaking | ||
| $: isSendAction | ||
| $: isSendAction //TODO: fix scopes |
Collaborator
There was a problem hiding this comment.
TODO
Is it necessary? If so, before what event?
Collaborator
There was a problem hiding this comment.
I think this is used because rules must be inverted or something else if they have different directions, am I right?
Collaborator
Author
There was a problem hiding this comment.
TODO is outdated, removed
Yes, rules are (dynamically) inverted depending on the scope.
src/asyncapi/asyncapi3.rules.ts
Outdated
| }) | ||
|
|
||
| // Operations map rules with dynamic operation type detection | ||
| //TODO: review |
| const jsonDraft7SchemaRules: CompareRules = withDynamicScopeReclassification( | ||
| jsonSchemaRules({ | ||
| additionalRules: { | ||
| description: diffDescription(resolveSchemaDescriptionTemplates()), //TODO: verify description templates |
Collaborator
Author
There was a problem hiding this comment.
Actual for now, won't do as part of this PR.
JayLim2
requested changes
Mar 17, 2026
src/asyncapi/asyncapi3.bindings.ts
Outdated
| $: allUnclassified, | ||
| '/*': { | ||
| $: allUnclassified, | ||
| '/*': { $: allUnclassified }, |
…g for proper design
JayLim2
approved these changes
Mar 19, 2026
…n a merged specification for AsyncAPI (#66) * feat: ability to have firstReferenceKeyProperty returned by apiDiff in a merged specification for AsyncAPI * refactor: add AsyncAPI validation utility for tests - add asyncapi/parser as dev dependency - add helper function to check AsyncAPI samples validity - add Cursor instructions for AsyncAPI tests * refactor: added add/remove test in combination with modify for messages, servers and operations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.