-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
Description
Describe the bug
The copy button in code samples is not capturing the complete request when there's a JSON payload. The HTTP method and endpoint path are chopped off.
Current behavior
- Only JSON body is copied
- HTTP request/endpoint line is lost
Example
What appears in docs:

What gets copied:
{
"mappings": {
"properties": {
"content": {
"type": "semantic_text"
}
}
}
}
Expected behavior
- Complete request should be copied, including:
- HTTP method (PUT, GET, etc.)
- Endpoint path
- JSON body
Steps to reproduce
- Navigate to documentation page with REST API examples, for example
- Find a code sample that includes JSON payload
- Click the copy button
- Paste the copied content
Environment
- Browser: Chrome, Safari, Firefox
- OS: macOS
Tooling
- docs-builder
- migration tooling
- I'm not sure