[OAS] Promote space awareness in REST docs#230594
Conversation
|
Pinging @elastic/kibana-core (Team:Core) |
| function getSpaceAlternatePathHtml(method, path) { | ||
| return `<div><span class="operation-verb ${method.toLocaleLowerCase()}">${method}</span> <span class="operation-path">/s/{space_id}${path}</span></div>\n\nSee [spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.`; | ||
| } |
There was a problem hiding this comment.
⏳ Build in-progress, with failures
Failed CI StepsTest Failures
History
cc @jloleysens |
| const NON_SPACE_PATH_PREFIXES = new Set([ | ||
| '/api/upgrade_assistant', | ||
| '/api/logstash/pipeline', | ||
| '/api/logstash/pipelines', | ||
| '/api/task_manager/_health', | ||
| '/api/cases/reporters', | ||
| '/api/encrypted_saved_objects/_rotate_key', | ||
| '/api/short_url', | ||
| '/api/features', | ||
| '/api/security/role', | ||
| '/api/spaces', | ||
| '/api/security/session/_invalidate', | ||
| ]).values(); |
There was a problem hiding this comment.
This is the "best effort" aspect. Based on where we did not mention the spaces alternative in our previous docs iterations. There may be a few paths this does not catch.
The other side-effect of this is that new paths will get the spaces alternative mentioned unless they are captured here. I think this is OK, but others may feel differently.
There was a problem hiding this comment.
SGTM. I wonder if another downside is: if most endpoints have the extra Space awareness callout, maybe folks won't notice this subset.
There was a problem hiding this comment.
Yeah, that's true. It's kind of a drop in the bucket. The most useful one to skip is probably /api/spaces... And come to think of it /api/status too. Will add these in #230931
florent-leborgne
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the improvement! If possible I'd wait for @georgewallace's input since this work relates to https://github.com/elastic/docs-content-internal/issues/40
Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
| const NON_SPACE_PATH_PREFIXES = new Set([ | ||
| '/api/upgrade_assistant', | ||
| '/api/logstash/pipeline', | ||
| '/api/logstash/pipelines', | ||
| '/api/task_manager/_health', | ||
| '/api/cases/reporters', | ||
| '/api/encrypted_saved_objects/_rotate_key', | ||
| '/api/short_url', | ||
| '/api/features', | ||
| '/api/security/role', | ||
| '/api/spaces', | ||
| '/api/security/session/_invalidate', | ||
| ]).values(); |
There was a problem hiding this comment.
SGTM. I wonder if another downside is: if most endpoints have the extra Space awareness callout, maybe folks won't notice this subset.
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/16797879779 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
(cherry picked from commit c9fedf5) # Conflicts: # oas_docs/output/kibana.serverless.yaml # oas_docs/output/kibana.yaml
## Summary Follow up on #230594
## Summary Follow up on elastic#230594
# Backport This will backport the following commits from `main` to `8.19`: - [[OAS] Promote space awareness in REST docs (#230594)](#230594) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Jean-Louis Leysens","email":"jeanlouis.leysens@elastic.co"},"sourceCommit":{"committedDate":"2025-08-07T07:22:09Z","message":"[OAS] Promote space awareness in REST docs (#230594)","sha":"c9fedf5dc26f1a9ec437ebb10ca72abae191d876","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","Feature:OAS","backport:version","v8.19.0","v9.2.0"],"title":"[OAS] Promote space awareness in REST docs","number":230594,"url":"https://github.com/elastic/kibana/pull/230594","mergeCommit":{"message":"[OAS] Promote space awareness in REST docs (#230594)","sha":"c9fedf5dc26f1a9ec437ebb10ca72abae191d876"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230594","number":230594,"mergeCommit":{"message":"[OAS] Promote space awareness in REST docs (#230594)","sha":"c9fedf5dc26f1a9ec437ebb10ca72abae191d876"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Michael Dokolin <dokmic@gmail.com>
## Summary Follow up on elastic#230594
## Summary Follow up on elastic#230594 (cherry picked from commit 0fb028c) # Conflicts: # oas_docs/output/kibana.serverless.yaml # oas_docs/output/kibana.yaml
Summary
Copies the ES approach to specifying alternate paths in our docs. This is a best effort approach to providing docs users with information about each path's space alternative. Every path that is "spaces aware" will have the following call out in the description:
Relates to: https://github.com/elastic/docs-content-internal/issues/40