mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [[UA][Core][API Deprecations] Add deprecate type and update copy (#198800)](https://github.com/elastic/kibana/pull/198800) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ahmad Bamieh","email":"ahmad.bamyeh@elastic.co"},"sourceCommit":{"committedDate":"2024-11-06T05:43:56Z","message":"[UA][Core][API Deprecations] Add deprecate type and update copy (#198800)\n\n## Summary\r\n\r\n- [x] Add `deprecate` Type to the API Deprecations reasons.\r\n- [x] Add a `message` optional field that is surfaced in the UA\r\n- [x] Add IDE documentation in the autocomplete for all deprecation\r\nfields.\r\n- [x] Updated README and example plugin for the `deprecate` type\r\n- [x] Update copy for `deprecate`.\r\n\r\n\r\nCloses https://github.com/elastic/kibana/issues/197721\r\n\r\n## Testing\r\n\r\nRun kibana locally with the test example plugin that has deprecated\r\nroutes\r\n```\r\nyarn start --plugin-path=examples/routing_example --plugin-path=examples/developer_examples\r\n```\r\n\r\nThe following comprehensive deprecated routes examples are registered\r\ninside the folder:\r\n`examples/routing_example/server/routes/deprecated_routes`\r\n\r\nRun them in the dev console to trigger the deprecation condition so they\r\nshow up in the UA:\r\n\r\n```\r\nGET kbn:/api/routing_example/d/deprecated_route\r\n```\r\n\r\n<img width=\"628\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/3c0e1829-9a07-49bd-94a3-398514f448e2\">\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>","sha":"665cf98067b6fbd8850866c75e189c937e1c2dbd","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","auto-backport","backport:prev-minor","v8.17.0"],"title":"[UA][Core][API Deprecations] Add deprecate type and update copy","number":198800,"url":"https://github.com/elastic/kibana/pull/198800","mergeCommit":{"message":"[UA][Core][API Deprecations] Add deprecate type and update copy (#198800)\n\n## Summary\r\n\r\n- [x] Add `deprecate` Type to the API Deprecations reasons.\r\n- [x] Add a `message` optional field that is surfaced in the UA\r\n- [x] Add IDE documentation in the autocomplete for all deprecation\r\nfields.\r\n- [x] Updated README and example plugin for the `deprecate` type\r\n- [x] Update copy for `deprecate`.\r\n\r\n\r\nCloses https://github.com/elastic/kibana/issues/197721\r\n\r\n## Testing\r\n\r\nRun kibana locally with the test example plugin that has deprecated\r\nroutes\r\n```\r\nyarn start --plugin-path=examples/routing_example --plugin-path=examples/developer_examples\r\n```\r\n\r\nThe following comprehensive deprecated routes examples are registered\r\ninside the folder:\r\n`examples/routing_example/server/routes/deprecated_routes`\r\n\r\nRun them in the dev console to trigger the deprecation condition so they\r\nshow up in the UA:\r\n\r\n```\r\nGET kbn:/api/routing_example/d/deprecated_route\r\n```\r\n\r\n<img width=\"628\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/3c0e1829-9a07-49bd-94a3-398514f448e2\">\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>","sha":"665cf98067b6fbd8850866c75e189c937e1c2dbd"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198800","number":198800,"mergeCommit":{"message":"[UA][Core][API Deprecations] Add deprecate type and update copy (#198800)\n\n## Summary\r\n\r\n- [x] Add `deprecate` Type to the API Deprecations reasons.\r\n- [x] Add a `message` optional field that is surfaced in the UA\r\n- [x] Add IDE documentation in the autocomplete for all deprecation\r\nfields.\r\n- [x] Updated README and example plugin for the `deprecate` type\r\n- [x] Update copy for `deprecate`.\r\n\r\n\r\nCloses https://github.com/elastic/kibana/issues/197721\r\n\r\n## Testing\r\n\r\nRun kibana locally with the test example plugin that has deprecated\r\nroutes\r\n```\r\nyarn start --plugin-path=examples/routing_example --plugin-path=examples/developer_examples\r\n```\r\n\r\nThe following comprehensive deprecated routes examples are registered\r\ninside the folder:\r\n`examples/routing_example/server/routes/deprecated_routes`\r\n\r\nRun them in the dev console to trigger the deprecation condition so they\r\nshow up in the UA:\r\n\r\n```\r\nGET kbn:/api/routing_example/d/deprecated_route\r\n```\r\n\r\n<img width=\"628\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/3c0e1829-9a07-49bd-94a3-398514f448e2\">\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>","sha":"665cf98067b6fbd8850866c75e189c937e1c2dbd"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Ahmad Bamieh <ahmad.bamyeh@elastic.co>
24 lines
1.1 KiB
TypeScript
24 lines
1.1 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the "Elastic License
|
|
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
|
* Public License v 1"; you may not use this file except in compliance with, at
|
|
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
|
*/
|
|
|
|
export const RANDOM_NUMBER_ROUTE_PATH = '/api/random_number';
|
|
|
|
export const RANDOM_NUMBER_BETWEEN_ROUTE_PATH = '/api/random_number_between';
|
|
|
|
export const POST_MESSAGE_ROUTE_PATH = '/api/post_message';
|
|
|
|
// Internal APIs should use the `internal` prefix, instead of the `api` prefix.
|
|
export const INTERNAL_GET_MESSAGE_BY_ID_ROUTE = '/internal/get_message';
|
|
|
|
export const DEPRECATED_ROUTES = {
|
|
DEPRECATED_ROUTE: '/api/routing_example/d/deprecated_route',
|
|
REMOVED_ROUTE: '/api/routing_example/d/removed_route',
|
|
MIGRATED_ROUTE: '/api/routing_example/d/migrated_route',
|
|
VERSIONED_ROUTE: '/api/routing_example/d/versioned',
|
|
};
|