Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to deprecate paths #75

Open
vagosduke opened this issue Feb 16, 2023 · 1 comment
Open

Add option to deprecate paths #75

vagosduke opened this issue Feb 16, 2023 · 1 comment

Comments

@vagosduke
Copy link

vagosduke commented Feb 16, 2023

Is your feature request related to a problem? Please describe.
Once defined, all paths are added to the api version they are linked with, and all the following versions after that. It would be beneficial to be able to deprecate paths

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A deprecate_in= option in the @version decorator could cause certain viewfunctions to stop being added to the API paths after a certain version.

An example would be the following

@app.get('/greet')
@version(1)
def greet():
  return 'Hello'

@app.get('/greet')
@version(2, deprecate_in=3)
def greet():
  return 'Hi'

@app.get('/new-greet')
@version(3)
def new_greet():
  return 'This is a different greetings function linked to a different url'

This would result in the following endpoints:

/v1/greet
/v2/greet
/v3/new-greet

(Now, the normal behaviour without deprecate_in is that in v3, both the /v3/new-greet and /v3/greet paths would be available)


I have implemented the solution, but I cannot push it. Can I be given access?

@crashCoder
Copy link

Hi, @vagosduke sadly this repo was abandoned a long time ago, you can look at all the opened issues. But thanks to @alexs there is a fork that contains fixes and improvements.

You can read more here: #65 (comment)

Hope it helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants