Comments (9)
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.
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.
Hi,
This is still on track but may take a couple more weeks.
Thanks for your patience.
from oasdiff.
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.
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.
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.
Hi @blva,
I'd like to close this issue.
Do you have any additional feedback?
from oasdiff.
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.
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)
- YAML/JSON field name typo: "reuired" -> "required" HOT 1
- Feature request: Support external metadata
- Verbose CLI output to help troubleshoot (especially in composed mode) HOT 5
- oasdiff error in composed mode when the same path appears in different files HOT 1
- Race condition while parsing command line arguments if telemetry is enabled HOT 1
- "Error resolving reference/map key not found" when running oasdiff across the set of files with intensive external refs HOT 1
- Supporting "--fail-on" option for changelog command
- basePath and servers.ulr support HOT 3
- Add support for AWS API Gateway extensions to OpenAPI HOT 6
- Diff tool gets confused when a new inline enum value is added and a new enum type is added at the sime time HOT 4
- Changelog does not log adding a new optional request body HOT 2
- `latest` docker container (April 8th) introduces a bug that causes false positives HOT 1
- --flatten-allof panic HOT 3
- Unmarshalling errors don't provide offset HOT 6
- Support breaking-changes and changelog for schemas with multiple types
- Support "flatten allOf" for schemas with multiple types
- Typo in description of incompatible changes HOT 2
- Incorrect Detection of Breaking Change for Default Values
- Adding deprecated: true to an operation yields a parse error HOT 5
- Handle default values properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oasdiff.