marshmallow-code / marshmallow-code/flask-smorest

Deprecating an API operation

Open
#196 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
717
Forks
77
Avg merge
7h 49m
Merged PRs (30d)
3

Description

On the OpenAPI spec we can mark an API operation https://swagger.io/specification/ as deprecated.

It is then shown with a warning of the UI :
![image](https://user-images.githubusercontent.com/32464/96720708-63d26400-13ab-11eb-8d81-425caec44754.png)

It is currently handled by the `doc` decorator, but this decorator is apparently going to be deprecated (as I understood from https://github.com/marshmallow-code/flask-smorest/issues/71).

Maybe a specific decorator could be added for API functions to provide this functionality ? This would help handling this usecase once the `doc` decorator is deprecated.

Contributor guide

Open the contributing guide

Research direction

Start with the current `doc` decorator handling and read the linked flask-smorest issue about its deprecation, then review the OpenAPI specification's deprecated operation support. Done means a dedicated API decorator can mark an operation as deprecated in the generated OpenAPI document without relying on `doc`.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, openapi, python
Domain
api, documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.