question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enabling jsonEditor does not change POST body editor

See original GitHub issue

Using Swagger UI v3.13.6 and v3.0.19, setting the jsonEditor parameter to true does not seem to enable any sort of graphical JSON editor as the documentation describes. I have tried with my local copy of Swagger UI with a Swagger 2.0 spec and the live demo on http://petstore.swagger.io/ using Chrome 66 on Windows 10.

In my local UI, I added jsonEditor: true to the SwaggerUIBundle constructor in the index.html file. I verified through the Chrome debugger that the changes were properly picked up, so I don’t believe this is a caching issue.

In the live demo and my local UI, I tried adding a ?jsonEditor=true query string, which likewise had no resulting change to the Swagger UI. I would expect the editor to no longer have the large JSON string text field and instead have a more user-friendly HTML form.

Is this feature currently broken on the v3 Swagger UI? If it is working for others, how do I properly enable it using the dist from the swagger-ui repo? I can modify the index.html or provide a query string; I don’t really care which so long as I can get this working. Our API is large and some POSTs are rather complex, so the better editor would be of massive benefit to us.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
iamtheddrmancommented, May 2, 2018

Thanks for the response! I love the project and look forward to the updated website whenever it’s ready.

0reactions
webroncommented, Jul 17, 2018

Closing in favor of #2771.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swagger UI - can't enable JSON editor for the request body
I found the solution. Add the following into index.html in the new SwaggerUi({}) constructor: docExpansion: "none", sorter: "alpha", jsonEditor: true, ...
Read more >
JSON Editor - npm
JSON Editor takes a JSON Schema and uses it to generate an HTML form. It has full support for JSON Schema version 3...
Read more >
Create complex custom AWS WAF JSON rules
This is a custom rule statement that blocks a request if it has XSS signatures in the BODY, but excludes the URIs /test,...
Read more >
Defining responses using the JSON editor - IBM Cloud Docs
This mechanism is useful if your dialog flow does not change based on the integration in use, and if you cannot know in...
Read more >
Global Settings & Styles (theme.json) | Block Editor Handbook
If you have used v1 previously, you don't need to update the version in the v1 file to v2, ... a theme can't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found