问题
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:
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
来源:https://stackoverflow.com/questions/37441859/swagger-ui-cant-enable-json-editor-for-the-request-body