-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[OAS] Beautify generated operation ids #198132
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
[OAS] Beautify generated operation ids #198132
Conversation
|
/ci |
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --update'
|
/ci |
|
/ci |
|
Pinging @elastic/kibana-core (Team:Core) |
afharo
left a comment
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 🚀
| .replace(/[\/]+$/, '') | ||
| .toLowerCase(); | ||
|
|
||
| const removePrefixes = ['internal/api/', 'internal/', 'api/']; // longest to shortest |
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.
super-nit: this could be a constant outside the function.
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]
History
|
lcawl
left a comment
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.
Output lgtm, thanks!
|
Starting backport for target branches: 8.16, 8.x https://github.com/elastic/kibana/actions/runs/11600057357 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
(cherry picked from commit e53d68c)
(cherry picked from commit e53d68c) # Conflicts: # oas_docs/bundle.json # oas_docs/bundle.serverless.json # oas_docs/output/kibana.serverless.yaml # oas_docs/output/kibana.yaml # packages/kbn-router-to-openapispec/src/__snapshots__/generate_oas.test.ts.snap # packages/kbn-router-to-openapispec/src/process_versioned_router.test.ts
# Backport This will backport the following commits from `main` to `8.x`: - [OAS] Beautify generated operation ids (#198132) (e53d68c) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jean-Louis Leysens","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-30T19:11:24Z","message":"[OAS] Beautify generated operation ids (#198132)","sha":"e53d68c26d6c1f5330ee196938c650a786919a70"},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]>
# Backport This will backport the following commits from `main` to `8.16`: - [OAS] Beautify generated operation ids (#198132) (e53d68c) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jean-Louis Leysens","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-30T19:11:24Z","message":"[OAS] Beautify generated operation ids (#198132)","sha":"e53d68c26d6c1f5330ee196938c650a786919a70"},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: lcawl <[email protected]>
Summary
Updates the logic for extracting operation IDs to something more usable. Note: for now we do not consider
versionwhen generating these.Related https://github.com/elastic/docs-projects/issues/253
Notes
oas_docs/bundle.jsonfor new output