Skip to content

Conversation

reakaleek
Copy link
Member

@reakaleek reakaleek commented Sep 16, 2025

Closes #1826

Changes

  • Identify and render multiple API call headers in console codeblocks

Input

```console
PUT my-index-000001
{
  "mappings": {
    "enabled": false <1>
  }
}

PUT my-index-000001/_doc/session_1
{
  "user_id": "kimchy",
  "session_data": {
    "arbitrary_object": {
      "some_array": [ "foo", "bar", { "baz": 2 } ]
    }
  },
  "last_updated": "2015-12-06T18:20:22"
}

GET my-index-000001/_doc/session_1 <2>

GET my-index-000001/_mapping <3>
```
1. The entire mapping is disabled.
2. The document can be retrieved.
3. Checking the mapping reveals that no fields have been added.

Output

image

How to test

  1. Copy the input to a markdown file somewhere in ./docs/**
  2. Run dotnet run --project src/tooling/docs-builder -- serve
  3. Validate the the output in the page you added the codeblock.

@reakaleek reakaleek requested review from a team as code owners September 16, 2025 20:01
@reakaleek reakaleek requested a review from cotti September 16, 2025 20:01
@reakaleek reakaleek self-assigned this Sep 16, 2025
@reakaleek reakaleek added the fix label Sep 16, 2025
Copy link

github-actions bot commented Sep 16, 2025

🔍 Preview links for changed docs

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 looks like a good solution to me!

@leemthompo
Copy link
Contributor

leemthompo commented Sep 17, 2025

++ this is a great quick solution!

I wonder if removing the borders would make it 100% clear that this is one big (copyable) block, might be overthinking this though (and probably not worth the investment)

For reference, that's how it was handled in the old docs

Screenshot 2025-09-17 at 10 01 04

@reakaleek
Copy link
Member Author

reakaleek commented Sep 17, 2025

++ this is a great quick solution!

I wonder if removing the borders would make it 100% clear that this is one big (copyable) block, might be overthinking this though (and probably not worth the investment)

For reference, that's how it was handled in the old docs

Screenshot 2025-09-17 at 10 01 04

@leemthompo I made the borders darker and dotted to make the segments feel less separated.

I still think there is a benefit for the borders, readability wise. I also tried removing the borders, but IMO the spacing didn't look right.

@reakaleek reakaleek merged commit 3b1c0c0 into main Sep 18, 2025
19 checks passed
@reakaleek reakaleek deleted the feature/multiple-api-calls-in-console branch September 18, 2025 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Remove console title highlighting
4 participants