[ML] Enhances api docs for modules endpoints#66738
Merged
peteharverson merged 3 commits intoelastic:masterfrom May 18, 2020
Merged
[ML] Enhances api docs for modules endpoints#66738peteharverson merged 3 commits intoelastic:masterfrom
peteharverson merged 3 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/ml-ui (:ml) |
darnautov
reviewed
May 15, 2020
Comment on lines
+89
to
+91
| * @apiParam {String} indexPatternTitle index pattern to recognize. Note that this does not need to be a Kibana | ||
| * index pattern, and can be the name of a single Elasticsearch index, | ||
| * or include a wildcard (*) to match multiple indices. |
Contributor
There was a problem hiding this comment.
please use @apiSchema (params) indexPatternTitleSchema instead
Contributor
There was a problem hiding this comment.
It requires the following:
- Defined the schema with a unique name in
x-pack/plugins/ml/server/routes/schemas/modules.tslike this
export const recognizeIndexParamsSchema = schema.object({
/**
* index pattern to recognize. Note that this does not need to be a Kibana
* index pattern, and can be the name of a single Elasticsearch index,
* or include a wildcard (*) to match multiple indices.
*/
indexPatternTitle: schema.string(),
})- import this schema into this file (
x-pack/plugins/ml/server/routes/modules.ts) and replace the current inline definition withrecognizeIndexParamsSchema. - update annotation to
@apiSchema (params) recognizeIndexParamsSchema
darnautov
reviewed
May 15, 2020
Comment on lines
+142
to
+143
| * @apiParam {String} [moduleId] ID of the module to return. If no module ID is supplied, | ||
| * an array of all modules will be returned. |
Contributor
There was a problem hiding this comment.
you can extract
schema.object({
...getModuleIdParamSchema(true),
})
to an export module in x-pack/plugins/ml/server/routes/schemas and use @apiSchema annotation instead
darnautov
reviewed
May 15, 2020
| * may be supplied in the setup endpoint which is added to the start of the ID of every job in the module. | ||
| * | ||
| * @apiParam {String} moduleId Module id | ||
| * @apiParam {String} moduleId ID of the module to check whether the jobs defined in the module exist. |
Contributor
There was a problem hiding this comment.
schema.object(getModuleIdParamSchema()) also can be defined as module in schemas
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/uptime/certificates·ts.Uptime app with generated data certificates can navigate to cert pageStandard OutStack TraceHistory
To update your PR or re-run it, just comment with: |
peteharverson
added a commit
to peteharverson/kibana
that referenced
this pull request
May 18, 2020
* [ML] Enhances api docs for modules endpoints * [ML] Edits to modules schema following review Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
peteharverson
added a commit
that referenced
this pull request
May 18, 2020
* [ML] Enhances api docs for modules endpoints * [ML] Edits to modules schema following review Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
May 19, 2020
* master: (24 commits) [APM] agent config 'profiling_inferred_spans_min_duration' default value is '0ms' but the min value in the field is '1ms' (elastic#66886) [Canvas] Fix flaky custom element functional tests (elastic#65908) Fix IE specific flexbox min-height issue (elastic#66555) [Discover] Unskip doc link functional test (elastic#66884) Index pattern management to Kibana platform (elastic#65026) Warning and link to support matrix for IE11 (elastic#66512) [Reporting] Consolidate Server Type Defs, move some out of Legacy (elastic#66144) [SIEM] [Maps] Fixes Network Map empty tooltip (elastic#66828) [Endpoint] Encode the index of the alert in the id response (elastic#66919) [services/testSubjects] reduce retry usage, add waitForEnabled (elastic#66538) [DOCS] Identifies cloud settings for APM (elastic#66935) [SIEM][CASE] Fix configuration's page user experience (elastic#66029) Resolver: Display node 75% view submenus (elastic#64121) [SIEM] Cases] Capture timeline click and open timeline in case view (elastic#66327) [APM] Lowercase agent names so icons work (elastic#66824) [dev/cli] add support for --no-cache (elastic#66837) [Ingest Manager] Better handling of package installation problems (elastic#66541) [ML] Enhances api docs for modules endpoints (elastic#66738) dont hide errors (elastic#66764) [RFC] Global search API (elastic#64284) ...
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enhances the API docs for the ML modules endpoints.
Also contains an edit to the apiDocs script, to fix the processing of the
@apiParamExampletag.