在骆驼盒中制作摇摇欲坠的动作URL
如果我的操作定义为(注意 - 所有名称都是假设的)
[HttpGet("api/[controller]/[action]")]
public string LogMeIn(...)
Swagger将生成URL为.../api/auth/logmein
我添加了选项,
services.AddRouting(opt => opt.LowercaseUrls = true)
这使我在Swagger ... ... /api/auth/logmein
,
但我需要在camelcase
- > .../api/auth/logmein
我尝试查看Swagger Options,App选项,但没有运气。我可以在这里做什么?顺便说一句,搜索了互联网。他们通常谈论参数/模型。这是Swagger UI URL。谢谢
If I have an action defined as (note - all names are hypothetical)
[HttpGet("api/[controller]/[action]")]
public string LogMeIn(...)
Swagger will generate URL as .../api/Auth/LogMeIn
I've added option
services.AddRouting(opt => opt.LowercaseUrls = true)
This got me to this point in the swagger .../api/auth/logmein
But I need to be at camelCase
--> .../api/auth/logMeIn
I've tried to look through swagger options, app options, but no luck. What can I do here? BTW, searched the internet. Mostly they talk about parameters/models. This is swagger UI URL. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道是否有内置的东西可用,但是您可以编写这样的简单文档过滤器。
在program.cs中
i don't know if something inbuilt is available or not but you can write a simple document filter like this.
in program.cs