* Start refactor with @montezdesousa * feat: add response model inside openapi_extra * feat: find+replace return types * fix: ruff * Feature/api response by provider (#6029) * init * Update router.py * Update registry_map.py * check dicts * lint * exclude provider on data model for package build * `results_type_repr` logic for `Annotated`, ignore provider field in `_extract_data` --------- Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: teh_coderer <me@tehcoderer.com>
2.0 KiB
Vendored
title, sidebar_position, description, keywords
| title | sidebar_position | description | keywords | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Deprecating Endpoints | 5 | This guide provides detailed instructions on how to deprecate an endpoint in the OpenBB Platform. |
|
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
Deprecating commands is essential to maintaining the OpenBB Platform. This guide outlines the process for deprecating an endpoint.
Deprecating an endpoint
-
Add the new endpoint that will replace the deprecated one.
-
Add the deprecation warning
Navigate to the router where the endpoint to be deprecated exists. Set the
deprecatedflag toTrueand adddeprecation=OpenBBDeprecationWarning(…)argument to the decorator. Refer to the example below:... from openbb_core.app.deprecation import OpenBBDeprecationWarning ... @router.command( model="MarketIndices", deprecated=True, deprecation=OpenBBDeprecationWarning( message="This endpoint is deprecated; use `/index/price/historical` instead.", since=(4, 1), expected_removal=(4, 5), ), ) async def market( cc: CommandContext, provider_choices: ProviderChoices, standard_params: StandardParams, extra_params: ExtraParams, ) -> OBBject: """Historical Market Indices.""" return await OBBject.from_query(Query(**locals())) -
Get approval from a OpenBB Platform maintainer: We will help you determine the appropriate version for the deprecation warning, and communicate the change(s) to the relevant personnel that might depend on the endpoint you are deprecating.
-
Remove as we say - the endpoint will be removed in the version specified in the deprecation warning.