-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '8.x' into backport/8.x/pr-199678
- Loading branch information
Showing
926 changed files
with
24,308 additions
and
13,751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
examples/routing_example/server/routes/deprecated_routes/internal.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* 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". | ||
*/ | ||
|
||
import type { IRouter } from '@kbn/core/server'; | ||
import { DEPRECATED_ROUTES } from '../../../common'; | ||
|
||
export const registerInternalDeprecatedRoute = (router: IRouter) => { | ||
router.get( | ||
{ | ||
path: DEPRECATED_ROUTES.INTERNAL_DEPRECATED_ROUTE, | ||
validate: false, | ||
options: { | ||
// Explicitly set access is to internal | ||
access: 'internal', | ||
deprecated: { | ||
documentationUrl: 'https://elastic.co/', | ||
severity: 'critical', | ||
message: 'Additonal message for internal deprecated api', | ||
reason: { type: 'deprecate' }, | ||
}, | ||
}, | ||
}, | ||
async (ctx, req, res) => { | ||
return res.ok({ | ||
body: { | ||
result: | ||
'Called deprecated route with `access: internal`. Check UA to see the deprecation.', | ||
}, | ||
}); | ||
} | ||
); | ||
|
||
router.get( | ||
{ | ||
path: DEPRECATED_ROUTES.INTERNAL_ONLY_ROUTE, | ||
validate: false, | ||
// If no access is specified then it defaults to internal | ||
}, | ||
async (ctx, req, res) => { | ||
return res.ok({ | ||
body: { | ||
result: | ||
'Called route with `access: internal` Although this API is not marked as deprecated it will show in UA. Check UA to see the deprecation.', | ||
}, | ||
}); | ||
} | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,6 @@ | |
}, | ||
{ | ||
"name": "security_detection_engine", | ||
"version": "8.15.9" | ||
"version": "8.16.1" | ||
} | ||
] |
Oops, something went wrong.