You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It may be necessary to remove an optional field. openapi support parameter deprecation, but oasdiff ignores it.
Describe the solution you'd like
Treat parameter deprecation the same as route deprecation, (a parameter should have an associated x-sunset valid with the route grace period)
Describe alternatives you've considered
Alternative will be to use oneOf and deprecation of schema, but it is even trickier for oasdiff (migrating existing schema to oneOf is considered a breaking change). Other alternative is to deprecate the whole route, and create a new route with version, but it is not optimal and respectful of REST principles.
$ oasdiff breaking --fail-on WARN deprecated_with_sunset.yml removed.yml ;echo$?
1 changes: 0 error, 1 warning, 0 info
warning [request-property-removed] at removed.yml
in API POST /echo
removed the request property 'message'
1
deprecated after sunset end, expecting no warning
The text was updated successfully, but these errors were encountered:
Hi @pledesert-sg
You are right. Deprecation is currently supported only for endpoints.
Supporting deprecation for schemas would require adapting the endpoint deprecation code to schemas.
Maybe someone from the community wants to pick this up?
Is your feature request related to a problem? Please describe.
It may be necessary to remove an optional field. openapi support parameter deprecation, but oasdiff ignores it.
Describe the solution you'd like
Treat parameter deprecation the same as route deprecation, (a parameter should have an associated x-sunset valid with the route grace period)
Describe alternatives you've considered
Alternative will be to use oneOf and deprecation of schema, but it is even trickier for oasdiff (migrating existing schema to oneOf is considered a breaking change). Other alternative is to deprecate the whole route, and create a new route with version, but it is not optimal and respectful of REST principles.
Additional context
orig.yml:
deprecate.yml:
deprecated_with_sunset.yml
removed.yml
-> no sunset, expected missing sunset warning
The text was updated successfully, but these errors were encountered: