GithubHelp home page GithubHelp logo

Comments (9)

reuvenharrison avatar reuvenharrison commented on June 28, 2024 2

Update:
I've started working on this as you can see here: https://github.com/Tufin/oasdiff/tree/deprecation
So far it seems pretty straightforward.

from oasdiff.

blva avatar blva commented on June 28, 2024 1

I'm committing #118 for the first part: depreciating a resource is not a breaking change.

Thanks for your patience and changes @reuvenharrison!

Regarding the 2nd request to ignore deprecated removals, I understand the motivation but I have a reservation about the proposed solution.

Perhaps making the extension name configurable would be helpful to customers? Or more confusing... x-eol works. I have no additional feedback regarding this. Thanks!

from oasdiff.

reuvenharrison avatar reuvenharrison commented on June 28, 2024 1

Hi,
This is still on track but may take a couple more weeks.
Thanks for your patience.

from oasdiff.

reuvenharrison avatar reuvenharrison commented on June 28, 2024

Thanks for reporting this issue.

I suggest to fix this by changing the behavior so that deprecating a resource is not breaking.
Only deleting a resource will be breaking.
Any objections?

Please note that I will implement this change for all types of resources that support the deprecated flag:

  • Operation
  • Parameter
  • Header
  • Schema

from oasdiff.

blva avatar blva commented on June 28, 2024

Thanks for your quick reply!

depreciating a resource is not a breaking change

We would appreciate to have this implemented.

Only deleting a resource will be breaking.

Would it be possible to also ignore the breaking change under a flag? --ignore-deprecated-resource-removal for example. We can also make a contribution for the latter if it's too specific to our business logic and the team is OK with that approach.

Once again,
Thanks!

from oasdiff.

reuvenharrison avatar reuvenharrison commented on June 28, 2024

I'm committing a fix for the first part: depreciating a resource is not a breaking change.

Regarding the 2nd request to ignore deprecated removals, I understand the motivation but I have a reservation about the proposed solution.
The problem with this solution is that it allows someone to deprecate a resource and very soon afterwards to delete it. In such a case, the new flag will have no effect.
A better removal policy would require a grace period between deprecation and removal which would allow people to know that the resource is about to be removed.
Perhaps we could require publishing an end-of-life date alongside the deprecation and only allow removal after that date. In addition, you would probably also want to control the grace-time, for example 1 week or 30 days.

For example:
When deprecating a resource, the user should specify the end-of-life date with a dedicated extension (e.g., x-eol).
EOL date should be at least deprecation-grace-period from now.
The API should not be deleted before this date.

paths:
  /api/test:
    get:
      deprecated: true
      x-eol: 13-Jun-2022 

Calling oasdiff:

oasdiff -deprecation-grace-period=30 -base spec1.yaml -revision spec2.yaml

Looking forward to your feedback.

from oasdiff.

reuvenharrison avatar reuvenharrison commented on June 28, 2024

Hi @blva,
I'd like to close this issue.
Do you have any additional feedback?

from oasdiff.

blva avatar blva commented on June 28, 2024

Hi! Sorry for the delay I am out of the office. I will circle back to your proposal tomorrow as I will be back from my vacation. Thanks!

from oasdiff.

blva avatar blva commented on June 28, 2024

Hi @reuvenharrison, I wanted to check in if you have any plans for a timeline as to when x-eol could be available so we can plan accordingly. Thanks!

from oasdiff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.