Skip to content

yaml and json diffs differ #712

@fenuks

Description

@fenuks

Describe the bug
oasdiff diff --format yaml and oasdiff diff --format json return different
object.

To Reproduce
old.yml

openapi: 3.0.3
info:
    version: 0.0.0

new.yml

openapi: 3.0.3
info:
    version: 0.0.1
  1. oasdiff diff old.yml new.yml --format yaml
info:
    version:
        from: 0.0.0
        to: 0.0.1
  1. oasdiff diff old.yml new.yml --format json
{"info":{"version":{"from":"0.0.0","to":"0.0.1"}},"components":{}}
  1. Notice that JSON response contains additional key with an empty object.

Expected behaviour
YAML and JSON responses should be equivalent and parse to the same object.

Desktop (please complete the following information):

  • OS: Linux, oasdiff v1.11.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions