Skip to content

Schema description update should be considered as a metadata change #694

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

Open
stefknumias opened this issue Aug 13, 2024 · 2 comments
Open
Labels
Breaking/Non-Breaking classification Issues related to Breaking/Non-Breaking changes classification duplicate
Milestone

Comments

@stefknumias
Copy link

stefknumias commented Aug 13, 2024

Hello,

When diffing this spec:

openapi: 3.0.3
info:
  title: Test
paths:
  /foo:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: string
              description: desc v1

with this one:

openapi: 3.0.3
info:
  title: Test
paths:
  /foo:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: string
              description: desc v2

I get the following output:

==========================================================================
==                            API CHANGE LOG                            ==
==========================================================================
                                   Test                                   
--------------------------------------------------------------------------
--                            What's Changed                            --
--------------------------------------------------------------------------
- POST   /foo
  Request:
        - Changed application/json
          Schema: Backward compatible
--------------------------------------------------------------------------
--                                Result                                --
--------------------------------------------------------------------------
                   API changes are backward compatible                    
--------------------------------------------------------------------------

Since only the description field changed, I would expect a "metadata" change instead of a "compatible" one.

Changes to the description are correctly marked as metadata ones internally (see here and here) but I suspect the final value that is picked up to be the default one returned here. I don't have the time or means to debug it further however.

Tested version: 2.1.0-beta.11

@DrSatyr
Copy link
Collaborator

DrSatyr commented Jan 25, 2025

In addition to this issue.
ConsoleRender have no possibility to render such data as you expected here. So to resolve the issue we have to review ChangesSchema alongside with ConsoleRender

@DrSatyr
Copy link
Collaborator

DrSatyr commented Jan 27, 2025

Suggest to address this issue as part of #611 as a special case

@DrSatyr DrSatyr added the Breaking/Non-Breaking classification Issues related to Breaking/Non-Breaking changes classification label Apr 5, 2025
@DrSatyr DrSatyr added this to the 2.2.0 milestone Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking/Non-Breaking classification Issues related to Breaking/Non-Breaking changes classification duplicate
Projects
None yet
Development

No branches or pull requests

2 participants