-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[Doc] OpenAPI spec #17292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Doc] OpenAPI spec #17292
Conversation
This pull request does not have a backport label. Could you fix it @kaisecheng? 🙏
|
Related: #16594 Also tagging @lcawl as our resident API guru. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaisecheng, I generated a BUMP.SH preview, and this is looking good! Thanks for fleshing out so much of the content. Please keep it going!
Bump links expire after a short time, but I'm happy to pull down new content and generate a new link
anytime you'd like for me to.
type: object | ||
additionalProperties: | ||
description: "pipeline name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that description makes sense in this context, so IMO it either needs to be improved or removed.
description: "pipeline name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In OpenAPI, additionalProperties
means a map structure where the key / field name is dynamic generated
{
additionalProperty1: { ... }
additionalProperty2: { ... }
}
Description is to tell user the dynamic part additionalProperty1
is a pipeline name, where the pipeline name is a user defined value.
Take a static field example from _node/os
{
"os": {
"name": "Mac OS X",
"arch": "x86_64",
"version": "10.12.4",
"available_processors": 8
}
}
os, name, arch, version, available_processors never change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated the description to explain the key and value
Hi! When I run
The operationId uniquely identifies the operation. It is case sensitive and must be unique in the OpenAPI document. It is recommended to use camel case (for example, createConnector). The rest of my suggestions are just style-related and shouldn't be considered blockers. Thanks for creating this content! |
Co-authored-by: Lisa Cawley <[email protected]>
Co-authored-by: Lisa Cawley <[email protected]>
Co-authored-by: Lisa Cawley <[email protected]>
Co-authored-by: Lisa Cawley <[email protected]>
Co-authored-by: Lisa Cawley <[email protected]>
Co-authored-by: Lisa Cawley <[email protected]>
- add links and description - add infinity to flow window - fix flow stats component
@karenzone @lcawl Many thanks for helping to build the doc. I think this is ready for another review.
|
example: ["pipeline_execution"] | ||
items: | ||
type: string | ||
diagnosis: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diagnosis:
There's a linting error related to this definition:
[9] logstash-api.yaml:1455:33 at #/paths/~1_health_report/get/responses/200/content/application~1json/examples/backpressureCase/value/indicators/pipelines/indicators/blocked-pipeline/diagnosis/0/id
Example value must conform to the schema: `0` property must NOT have unevaluated properties `id`.
1453 | symptom: "The pipeline is unhealthy; 1 area is impacted and 1 diagnosis is available"
1454 | diagnosis:
1455 | - id: "logstash:health:pipeline:flow:worker_utilization:diagnosis:5m-blocked"
1456 | cause: "pipeline workers have been completely blocked for at least five minutes"
1457 | action: "address bottleneck or add resources"
referenced from logstash-api.yaml:1313:15 at #/paths/~1_health_report/get/responses/200/content/application~1json
Warning was generated by the no-invalid-media-type-examples rule.
I think this means the id
value that appears in the example is missing from this schema definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking with https://editor-next.swagger.io/ I got this warnings:
severity | line | code | Message |
---|---|---|---|
Warning | 1319 | 10069 | property "example" is deprecated, use "examples" instead |
Warning | 1342 | 10069 | property "example" is deprecated, use "examples" instead |
Warning | 1379 | 10069 | property "example" is deprecated, use "examples" instead |
Hint | 1506 | 10071 | nullable has no special meaning, if not set on purpose use type="null" instead |
Hint | 2010 | 10071 | nullable has no special meaning, if not set on purpose use type="null" instead |
Hint | 2017 | 10071 | nullable has no special meaning, if not set on purpose use type="null" instead |
Hint | 2021 | 10071 | nullable has no special meaning, if not set on purpose use type="null" instead |
- add id to health report - fix typo - add comment for the usage of allOf
@andsel |
@andsel - If @kaisecheng has addressed your concerns, can you please remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaisecheng, thank you for all of the thought and effort you put into this project. LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM2, thanks for addressing all my suggestions!
Thank you all for your suggestions! It looks good |
PUBLISHED: https://www.elastic.co/docs/api/doc/logstash/ |
Release notes
Migrate API doc to OpenAPI spec
What does this PR do?
/_node/<types>
to/_node/jvm
,/_node/pipelines
and/_node/os
/_node/stats
,/_node/stats/pipelines
,/_node/stats/pipelines/{pipeline_name}
,/_node/stats/jvm
,/_node/stats/flow
,/_node/stats/events
,/_node/stats/process
,/_node/stats/reloads
Why is it important/What is the impact to the user?
Checklist
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs