snyk / vervet

API resource versioning tool
Other
18 stars 5 forks source link

Implement explicit operation sunsetting #100

Open cmars opened 2 years ago

cmars commented 2 years ago

Implement the explicit operation sunsetting required by the solution proposed in #99.

Proposal here is to introduce two extensions on operations in versioned specs:

cmars commented 2 years ago

I think this can be done in a single extension on the operation, x-snyk-deprecated-on, which takes a date of the form YYYY-mm-dd.

Adding x-snyk-deprecated-on to an operation should cause requests to this endpoint to be regarded as deprecated, as if it had been followed by a newer release on the date given. Sunset calculation is determined according to this date and the stability of the operation being deprecated.

A Sweater Comb rule will also be needed to prevent shenanigans, such as back-dating a deprecation.