现在,我尝试使用外部定义的组件导入新的 API 定义,例如: OAS 3.x 文档捕获
但是,在所有情况下,我们都会检索空白的定义对象: APIM 导入结果
规范指向这样的 URL:
components:
schemas:
Command:
$ref: "https://xxxxxxxxxxx/docs-and-specs/published/products/connect_your_fleet/swagger/command_management_external.yaml#/components/schemas/Command"
我尝试过各种方法,但它生成相同的结果。
有什么想法吗?导入此格式的 APIM 是否有限制?该文档没有任何关于此限制的参考。(https://learn.microsoft.com/en-us/azure/api-management/api-management-api-import-restrictions)
请提供一些解决方案或澄清答案...
文档提到您无法引用外部 URL,因此这是不可能的。您需要将架构嵌入到同一个文件中。
https://learn.microsoft.com/en-us/azure/api-management/api-management-api-import-restrictions