Open jay763190097 opened 1 week ago
Hi @jay763190097
Thanks for your issues ! Could you please provide more details on the use case for supporting multiple request and response examples? Understanding your specific scenario will help us better evaluate and implement this feature.
@linwumingshi , Actually, It's the same meaning with example in Open API. In Open API, we have request example and response example these two concept, it's helpful for testing different scenarios in debug mode.
@linwumingshi , Actually, It's the same meaning with example in Open API. In Open API, we have request example and response example these two concept, it's helpful for testing different scenarios in debug mode.
Currently, smart-doc only supports auto-generating random values or using mock data. If multiple test cases are involved, the data source for these test cases might be more complex to write. You can propose some of your implementation solutions.
@linwumingshi Understand. In my opinion, we can add a tag @Example name type(body, header, request parameter, path parameter) value
,
if it's a json body, value can like this file(classpath:test_scenario1_success.json)
.
But this one, I recommender that we only display examples on the debug page, and can choose different example name to test it.
Is your feature request related to a problem? Please describe.(关于这个PR的描述,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
Do you have a plan to support multiple request example and mutiple response example
Basic example (PR的用例,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
can support multiple request example and multiple response example
Describe the solution you'd like (描述您想要的解决方案,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
can support multiple request example and multiple response example
Describe alternatives you've considered (描述你考虑过的替代方案,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
No response
Additional context (其他背景信息,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
No response
Validations