Skip to content
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

Merged
merged 17 commits into from
Oct 30, 2024

Conversation

jloleysens
Copy link
Contributor

@jloleysens jloleysens commented Oct 29, 2024

Summary

Updates the logic for extracting operation IDs to something more usable. Note: for now we do not consider version when generating these.

Related https://github.com/elastic/docs-projects/issues/253

Notes

  • Not intended to be the perfect solution, just cover 90+% of cases, we should use overlays for the rest.
  • See contents of oas_docs/bundle.json for new output

@jloleysens jloleysens added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Feature:OAS Work or issues related to Core-provided mechanisms for generating OAS v8.16.0 backport:version Backport to applied version labels v8.17.0 labels Oct 29, 2024
@jloleysens
Copy link
Contributor Author

/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'
@jloleysens
Copy link
Contributor Author

/ci

@jloleysens
Copy link
Contributor Author

/ci

@jloleysens jloleysens marked this pull request as ready for review October 30, 2024 11:33
@jloleysens jloleysens requested a review from a team as a code owner October 30, 2024 11:33
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Copy link
Member

@afharo afharo left a 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
Copy link
Member

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.

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #15 / Description renders description correctly

Metrics [docs]

✅ unchanged

History

Copy link
Contributor

@lcawl lcawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Output lgtm, thanks!

@jloleysens jloleysens merged commit e53d68c into elastic:main Oct 30, 2024
22 checks passed
@jloleysens jloleysens deleted the oas/beautify-operation-ids branch October 30, 2024 19:11
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11600057357

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.16 Backport failed because of merge conflicts
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 198132

Questions ?

Please refer to the Backport tool documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:OAS Work or issues related to Core-provided mechanisms for generating OAS release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants