简体   繁体   English

在 wso2 api 管理器中更改语法突出显示激活

[英]change syntax highlighting activation in wso2 api manager

Sometimes response of a service is too large that swagger cannot get and beautify response as json.有时一个服务的响应太大以至于 swagger 无法获得和美化响应为 json。 if we try with "curl" command, we get response very fast.如果我们尝试使用“curl”命令,我们会很快得到响应。 I think this is because of "Syntax highlighting" configuration of swagger.我认为这是因为 swagger 的“语法突出显示”配置。

In this url , we can understand that one way is change this config:在这个url中,我们可以理解一种方法是更改此配置:

springdoc.swagger-ui.syntaxHighlight.activated=false

Do you have any idea in wso2 apim 4.1.0?您对 wso2 apim 4.1.0 有任何想法吗? Can we change API Definition for this?我们可以为此更改 API 定义吗? or we have to change core configs of wso2?或者我们必须更改 wso2 的核心配置?

With advanced UI customization you should be able to get this done.通过高级 UI 自定义,您应该能够完成这项工作。 Please refer - https://apim.docs.wso2.com/en/latest/reference/customize-product/customizations/advanced-ui-customization/请参考 - https://apim.docs.wso2.com/en/latest/reference/customize-product/customizations/advanced-ui-customization/

You will have to customize the Swagger UI and add the springdoc.swagger-ui.syntaxHighlight.activated property there.您必须自定义 Swagger UI 并在那里添加 springdoc.swagger-ui.syntaxHighlight.activated 属性。 In[1], it is added springdoc.swagger-ui.validatorUrl for the Swagger UI.在 [1] 中,为 Swagger UI 添加了 springdoc.swagger-ui.validatorUrl。

[1] - https://github.com/wso2/apim-apps/blob/main/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/SwaggerUI.jsx#L32 [1] - https://github.com/wso2/apim-apps/blob/main/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/SwaggerUI.jsx# L32

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM