-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Excluding several comma-separated types of changes doesn't work in combination with --format json e.g. oasdiff diff --format json --exclude-elements=examples,description,title,summary spec1.yml spec2.yml
To Reproduce
Steps to reproduce the behavior:
- Save test files
cat << EOF >| spec1.yml
components:
schemas:
Int:
type: int
description: Integer
EOF
cat << EOF >| spec2.yml
components:
schemas:
Int:
type: int
description: Integer.
EOF
- Run oasdiff
$ oasdiff diff --format json --exclude-elements=description,title,summary
spec1.yml spec2.yml
{"extensions":{"modified":{"schemas":[{"oldValue":"Integer","value":"Integer.","op":"replace","from":"","path":"/Int/description"}]}},"components":{}}
Expected behavior
Description changes should be excluded. It worked last time I checked in oasdiff 1.10.16.
Desktop (please complete the following information):
- OS: Linux, oasdiff v1.11.1
Additional context
Filtering works if you skip --format json or pass only description to
--exclude-elements, that is both commands below work as expected, and filter
description change:
oasdiff diff --exclude-elements description,title,summary spec1.yml spec2.ymloasdiff diff --format json --exclude-elements description spec1.yml spec2.yml
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working