@asyncapi/diff / index
- AsyncAPIDiffOptions
- ChangeMarkdownGenerationConfig
- Classifier
- Config
- DiffOutput
- FormatterConfig
- JSONOutput
- MarkdownDropdownGenerationConfig
- OverrideObject
- ActionType
- ChangeType
- Changes
- DiffOutputItem
- MarkdownSubtype
- Output
- OutputType
- OverrideStandard
- StandardType
- ValueOperation
Ƭ ActionType: "add"
| "remove"
| "edit"
Ƭ ChangeType: typeof breaking
| typeof nonBreaking
| typeof unclassified
Ƭ Changes: DiffOutputItem
[] | string
Ƭ DiffOutputItem: DiffOutput
& { type
: ChangeType
}
Ƭ MarkdownSubtype: "json"
| "yaml"
| "yml"
Ƭ Output: JSONOutput
| string
Ƭ OutputType: "json"
| "yaml"
| "yml"
| "markdown"
| "md"
Ƭ OverrideStandard: StandardType
& OverrideObject
Ƭ StandardType: typeof v2Standard
| typeof v3Standard
Ƭ ValueOperation: ReplaceOperation
<any
> | AddOperation
<any
>
▸ diff(firstDocument
, secondDocument
, config?
): AsyncAPIDiff
Generates diff between two AsyncAPI documents
example
const output = diff(firstDocument, secondDocument, {
override: {
'/servers': {
add: 'non-breaking', // when a property has been added in the AsyncAPI document
remove: 'breaking', // when a property has been removed from the AsyncAPI document
edit: 'unclassified' // when a property has been edited in the AsyncAPI document
}
},
outputType: "yaml"
})
Name | Type | Description |
---|---|---|
firstDocument |
any |
The parsed AsyncAPI document |
secondDocument |
any |
The parsed AsyncAPI document |
config |
Config |
Configuration options |
The diff data