Feature Request: Copy Button for Sample Responses
Description
Hi π
First off, thank you for building and maintaining DummyJSON β it's an incredibly useful tool for prototyping and testing applications.
I'd like to suggest a small improvement to the documentation UX:
Currently, while the API endpoints and examples are well presented, there is no easy way to copy the sample JSON responses directly from the docs. This makes it slightly inconvenient when developers want to:
- Quickly reuse sample responses for mocking
- Create TypeScript types/interfaces
- Test UI components with realistic data
- Debug or inspect response structures
Proposed Improvement
Add a βCopyβ button to sample response blocks (similar to code snippets), allowing users to copy JSON responses with one click.
Suggested Behaviour
A small copy-to-clipboard button placed at the top-right corner of each sample response block, similar to what many documentation sites already do.
Example
For sections like:
[
{
"slug": "beauty",
"name": "Beauty",
"url": "https://dummyjson.com/products/category/beauty"
}
]
It would be helpful to have:
- π Copy button (top-right)
Benefits
- Improves developer experience significantly
- Saves time when building mock data or types
- Makes the docs more interactive and modern
- Aligns with common documentation standards
Contribution
I'd be happy to work on this feature and open a PR if it aligns with the project direction π
Feature Request: Copy Button for Sample Responses
Description
Hi π
First off, thank you for building and maintaining DummyJSON β it's an incredibly useful tool for prototyping and testing applications.
I'd like to suggest a small improvement to the documentation UX:
Currently, while the API endpoints and examples are well presented, there is no easy way to copy the sample JSON responses directly from the docs. This makes it slightly inconvenient when developers want to:
Proposed Improvement
Add a βCopyβ button to sample response blocks (similar to code snippets), allowing users to copy JSON responses with one click.
Suggested Behaviour
A small copy-to-clipboard button placed at the top-right corner of each sample response block, similar to what many documentation sites already do.
Example
For sections like:
[ { "slug": "beauty", "name": "Beauty", "url": "https://dummyjson.com/products/category/beauty" } ]It would be helpful to have:
Benefits
Contribution
I'd be happy to work on this feature and open a PR if it aligns with the project direction π