4

I have some issue to make it work, according to following link below, the JSON editor for the request body (disabled by default).

https://github.com/jensoleg/swagger-ui

How can I enable it?

1 Answer 1

2

I found the solution. Add the following into index.html in the new SwaggerUi({}) constructor:

docExpansion: "none",
sorter: "alpha",
jsonEditor: true,
defaultModelRendering: 'schema',
showRequestHeaders: true
Sign up to request clarification or add additional context in comments.

1 Comment

I had the same issue.I am using Swagger 2.0 and the thing that fixed it for me was including the "name" parameter in the body of the JSON.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.