问题描述
Azure团队敬上!
Hey Azure team!
当我将Swagger/OpenAPI文件导入API管理时,它使用摘要参数而不是operationId参数作为API管理门户中的显示名称.这是设计使然还是错误的?
When I'm importing my Swagger/OpenAPI files into API management it's using the summary parameter instead of the operationId parameter as the display name in API management portal. Is this by design or a mistake?
前一段时间,当它在导入时使用operationID作为显示名称,并且在导入我们的文件时,显示名称最终变成了swagger文件中所述的classname_methodname(例如Sighting_GetById).虽然很丑陋,但结果是操作 在开发人员门户网站中将在一起记录的内容归为一组,即:Sighting_getById,sighting_postSighting,sighting_deleteById等.
Some time ago when it used the operationID as Display name on import, and when I imported our files, the displayname ended up as classname_methodname (example sighting_GetById) as stated in the swagger file. Although ugly, the result was that operations that beloged together were grouped together in the developer portal, ie: sighting_getById, sighting_postSighting, sighting_deleteById etc.
现在,当我尝试导入文件时,首先出现一个错误,指出操作名称应在1到300个字符之间".而我的第一个问题是发现这是摘要"不是操作名称"那 swagger文件中的字符数不能超过300个字符.
Now when I try to import the file, at first I get an error that states "Operation name should be between 1 and 300 characters long" and my first problem is finding out that it were the "summary" not the "operation name" that wasn't allowed to be over 300 chars in the swagger file.
由于使用摘要字段描述方法而不是命名方法,这也使操作在开发人员门户中出现的顺序有些奇怪.
It also makes the order in which the operations appear in the developer portal a bit strange as we use the summary-field to describe the method rather than name it.
结果还导致无法编写更长的操作描述(用于在开发人员门户中显示).事后编辑描述可能是一个解决方案,尽管不是首选方法,因为它可能使安装更容易 关于api等的更新.
The result is also that it makes it impossible to write longer descriptions of the operations (for display in the developer portal). Editing the description afterwards could be an solution, although not preferred as it probably makes it easier to screwup on updates of the api etc.
最诚挚的问候,
亨宁·安德森
瑞典农业科学大学
Best regards,
Henning Andersson
Swedish University Of Agricultural Sciences
推荐答案
--------------------------------------------------- -------------------------------------------------- ----------------------
-----------------------------------------------------------------------------------------------------------------------
如果此答案有帮助,请单击标记为答案"或投票.要提供有关您的论坛体验的其他反馈,请单击这里
"If this answer was helpful, click "Mark as Answer" or Up-Vote. To provide additional feedback on your forum experience, clickhere
这篇关于将Swagger/OpenAPI文件导入Azure API管理时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!