Skip to content

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

Description

@stefk-fipto

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

Activity

  1. DrSatyr commented on Jan 25, 2025

    @DrSatyr
    Collaborator

    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

  2. DrSatyr commented on Jan 27, 2025

    @DrSatyr
    Collaborator

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

  3. added this to the 2.2.0 milestone on Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions