swagger-api / swagger-api/swagger-ui

Plugin or other to modify response before display

Open
#5,200 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat: configuration cat: customization cat: try-it-out type: feature
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

  • Browser: Chrome
  • Method of installation: git dist
  • Swagger-UI version: 3.20.0/4
  • Swagger/OpenAPI version: Swagger 2.0

image

I am trying to build a plugin or find a way to change the text displayed after the Try-it-out is executed.
I am trying to modify the text that is displayed in the Curl, Request URL, and Responses sections. I was trying to do this with the responseInterceptor, but it seems that the display is generated before the responseInterceptor is called, so any changes I made there do not reflect the printed data. I have looked at the plugin documentation but am having a hard time modifying it.

Can anyone help me do this or is there a different way of doing this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Swagger UI's plugin documentation and the responseInterceptor entry point. Trace how Try-it-out generates the Curl, Request URL, and Responses sections, then determine where those displayed values can be modified before rendering. Done means a documented plugin or supported approach changes the requested text.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.