Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diff : wrong management of $ref comparison #218

Closed
LasneF opened this issue Dec 13, 2023 · 1 comment
Closed

Diff : wrong management of $ref comparison #218

LasneF opened this issue Dec 13, 2023 · 1 comment
Labels
requires investigation This needs to be looked at in more detail

Comments

@LasneF
Copy link
Contributor

LasneF commented Dec 13, 2023

given the test below

    left := `openapi: 3.0
components:
  schemas:
    Yo:
      type: int
    OK:
      $ref: '#/components/schemas/Yo'`

    right := `openapi: 3.0
components:
  schemas:
    Yo:
      type: int
    OK:
      type: int'`

is set as breaking whereas to me should not

an approach would be to manage the diff after resolving the $ref so that it compares consistant definitive data
this would also match the refactoring use case where some item are moved , factorized and so on

@daveshanley daveshanley added the requires investigation This needs to be looked at in more detail label Dec 14, 2023
daveshanley added a commit that referenced this issue Jan 18, 2024
Signed-off-by: quobix <dave@quobix.com>
daveshanley added a commit that referenced this issue Jan 18, 2024
Signed-off-by: quobix <dave@quobix.com>
@daveshanley
Copy link
Member

This has been resolved in v0.15.0

Test cases can be found here: https://github.com/pb33f/libopenapi/blob/main/what-changed/model/schema_test.go#L2861

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires investigation This needs to be looked at in more detail
Projects
None yet
Development

No branches or pull requests

2 participants