为什么 "Generate Flows from REST API" 选项在 anypoint 平台中被禁用?

Why is "Generate Flows from REST API" option disabled in anypoint platform?

我正在尝试从 API RAML 文件创建一个新的 API 接口 Mule 配置。首先 - 我发布了一个 API 到 Anypoint Exchange,然后从设计中心导入 api 到 Anypoint Studio 项目。现在,当我右键单击 API RAML 文件并 selecting Mule > Generate Flows from REST API 时,此选项被禁用,我无法 select 它.

我正在使用 Mule 4 和 Anypoint Studio 版本:7.3.2。我验证了 API RAML 文件,其中没有可见的错误。是什么导致此选项被禁用,我该如何启用它?

下面是实际的 API RAML 文件。

#%RAML 1.0
version: v1
title: Accounts API

types:
  Account: !include datatypes/account.raml
  AccountNoID: !include datatypes/accountNoID.raml

/accounts:
  get:
    description: Retrieves accounts based on the given query parameters.
    headers:
      Requester-ID:
        description: id of the person requesting the accounts information
        required: true
    queryParameters:
      country:
        required: false
        type: string
      name:
        description: The system will look for names that contain the given value in the name parameter.
        required: false
        type: string
      type:
        required: true
        type: string
        enum: ["personal", "business"]
    responses:
      400:
        body:
          application/json:
            example: {
              "message": "Error retrieving data from the Account database."
            }
      200:
        description: Returns an array of Account objects in JSON
        body:
          application/json:
            type: Account[]
            examples:  !include examples/accountsExample.raml
  post:
    description: Creates new accounts based on a given array of Account objects.
    headers:
        Requester-ID:
          description: id of the person requesting the accounts information
          required: true
    body:
      application/json:
        description: Payload should be an array of Account objects with all fields present for each Account object.
        type: AccountNoID[]
        examples: !include examples/accountsExampleNoID.raml
    responses:
      400:
        body:
          application/json:
             example: {
               "message": "Error creating accounts. Please check the JSON object and make sure it's valid."
             }
      201:
        body:
          application/json:
            example: {
              "message": "Accounts uploaded (but not really)."
            }

如果该选项不可用,则表示 Studio 无法解析 RAML。

最近设计中心在如何处理 RAML 中的示例节点方面发生了变化。

详情在这里:https://docs.mulesoft.com/design-center/design-modify-raml-specs-conform

在这种情况下,Design Center 中的 RAML 是有效的,但由于 Studio 中的错误,目前在 Studio 中这被视为无效。

尝试在 examples 节点的 RAML 中使用命名示例。

examples:  
  myNamedExample: !include examples/accountsExample.raml