尝试使用此招摇的API在wso2 EI 6.4中不起作用

问题描述 投票:0回答:2

我使用了摇摇欲坠的yaml文件生成了API。 API已成功生成,并且在单击“ Swagger”链接进行检查时,我也能够看到json。但是,当我尝试通过单击“尝试此API”来测试此API时,此链接似乎无效。

http://localhost:8280/CustomAPI:v1.0.0?swaggertryit

有没有配置,我想念吗?非常感谢任何指针/帮助。

谢谢,Vipin

wso2 swagger wso2esb wso2ei
2个回答
0
投票

根据版本说明,EI 6.6.0中引入了“ Swagger功能”。 https://docs.wso2.com/display/EI660/About+this+Release


0
投票

Swagger tryit和swagger json功能默认在wso2 EI 6.4中未启用。在wso2 EI 6.6中对其进行了增强。要在6.4中完成此功能,请在标签HttpGetRequestProcessors中的conf / carbon.xml文件中添加以下属性,然后重新启动wso2。

<Processor>
 <Item>swagger.json</Item>           
 <Class>org.wso2.carbon.mediation.transport.handlers.requestprocessors.swagger.format.SwaggerJsonProcessor</Class>
</Processor>
<Processor>
 <Item>swagger.yaml</Item>           
<Class>org.wso2.carbon.mediation.transport.handlers.requestprocessors.swagger.format.SwaggerYamlProcessor</Class>
</Processor>
<Processor>
  <Item>swaggertryit</Item>
  <Class>org.wso2.carbon.tryit.SwaggerTryitRequestProcessor</Class>
</Processor>
© www.soinside.com 2019 - 2024. All rights reserved.