-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix-ml-links
- Loading branch information
Showing
514 changed files
with
3,535 additions
and
1,952 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
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
11 changes: 0 additions & 11 deletions
11
docs/development/core/server/kibana-plugin-server.routeschemas.body.md
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
docs/development/core/server/kibana-plugin-server.routeschemas.md
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
docs/development/core/server/kibana-plugin-server.routeschemas.params.md
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
docs/development/core/server/kibana-plugin-server.routeschemas.query.md
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
...elopment/core/server/kibana-plugin-server.routevalidationerror._constructor_.md
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,21 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [RouteValidationError](./kibana-plugin-server.routevalidationerror.md) > [(constructor)](./kibana-plugin-server.routevalidationerror._constructor_.md) | ||
|
||
## RouteValidationError.(constructor) | ||
|
||
Constructs a new instance of the `RouteValidationError` class | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
constructor(error: Error | string, path?: string[]); | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| error | <code>Error | string</code> | | | ||
| path | <code>string[]</code> | | | ||
|
20 changes: 20 additions & 0 deletions
20
docs/development/core/server/kibana-plugin-server.routevalidationerror.md
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,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [RouteValidationError](./kibana-plugin-server.routevalidationerror.md) | ||
|
||
## RouteValidationError class | ||
|
||
Error to return when the validation is not successful. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare class RouteValidationError extends SchemaTypeError | ||
``` | ||
## Constructors | ||
| Constructor | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [(constructor)(error, path)](./kibana-plugin-server.routevalidationerror._constructor_.md) | | Constructs a new instance of the <code>RouteValidationError</code> class | | ||
42 changes: 42 additions & 0 deletions
42
docs/development/core/server/kibana-plugin-server.routevalidationfunction.md
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,42 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [RouteValidationFunction](./kibana-plugin-server.routevalidationfunction.md) | ||
|
||
## RouteValidationFunction type | ||
|
||
The custom validation function if @<!-- -->kbn/config-schema is not a valid solution for your specific plugin requirements. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare type RouteValidationFunction<T> = (data: any, validationResult: RouteValidationResultFactory) => { | ||
value: T; | ||
error?: never; | ||
} | { | ||
value?: never; | ||
error: RouteValidationError; | ||
}; | ||
``` | ||
|
||
## Example | ||
|
||
The validation should look something like: | ||
|
||
```typescript | ||
interface MyExpectedBody { | ||
bar: string; | ||
baz: number; | ||
} | ||
|
||
const myBodyValidation: RouteValidationFunction<MyExpectedBody> = (data, validationResult) => { | ||
const { ok, badRequest } = validationResult; | ||
const { bar, baz } = data || {}; | ||
if (typeof bar === 'string' && typeof baz === 'number') { | ||
return ok({ bar, baz }); | ||
} else { | ||
return badRequest('Wrong payload', ['body']); | ||
} | ||
} | ||
|
||
``` | ||
|
Oops, something went wrong.