Open API 中 API ID 和 API 名称的区别?

Difference between API ID and API name in Open API?

在 Microsoft Azure API 管理中打开 API 规范时,我们会给出一些名称,而 swagger 规范文件也有一些名称作为标题。我们给出的名称作为 API ID,Swagger.json 中可用的标题作为 API 显示名称。那么AzureAPI管理中APIid和APIname有什么区别呢?

Name是OpenAPI中Contact Object的固定字段。

Name 反映了联系人的 识别名称 person/organization

Contact object 或任何其他 openapi 描述字段中没有 id 字段,但 openapi 文件可能有用户制作的 id 参数。

请看这个例子:

parameters:
- name: id
  in: path
  description: ID of pet to use
  required: true
  schema:
    type: array
    style: simple
    items:
      type: string  

看看operationIdoperationId 是一个可选的唯一字符串,用于标识操作。如果提供,这些 ID 在您的 API.

中描述的所有操作中必须是唯一的

所有 Azure 资源都有名称和 ID 是很常见的。资源 ID 已满 "resource path",类似于“/subscriptions/.../resourceGroups/.../providers/...”。该路径的最后一段是资源名称。